OutputService
in package
Uses
TStringTools, TNCLogger
Class OutputService
Table of Contents
- $ALERT : mixed
- $CRITICAL : mixed
- $DEBUG : mixed
- $EMERGENCY : mixed
- $ERROR : mixed
- $INFO : mixed
- $NOTICE : mixed
- $WARNING : mixed
- $migrationOutput : IOutput
- $occOutput : OutputInterface
- __construct() : mixed
- alert() : void
- debug() : void
- e() : void
- emergency() : void
- exception() : void
- finishMigrationProgress() : void
- generateRandomSentence() : string
- generateRandomWord() : string
- getDateDiff() : string
- humanReadable() : string
- log() : void
- logger() : LoggerInterface
- notice() : void
- output() : void
- setMigrationOutput() : void
- setOccOutput() : void
- startMigrationProgress() : void
- t() : void
- throwable() : void
- warning() : void
- commonPart() : string
- cut() : string
- feedStringWithParams() : string
- isUuid() : bool
- token() : string
- uuid() : string
- Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
Properties
$ALERT
public
static mixed
$ALERT
= 3
$CRITICAL
public
static mixed
$CRITICAL
= 3
$DEBUG
public
static mixed
$DEBUG
= 0
$EMERGENCY
public
static mixed
$EMERGENCY
= 4
$ERROR
public
static mixed
$ERROR
= 3
$INFO
public
static mixed
$INFO
= 1
$NOTICE
public
static mixed
$NOTICE
= 1
$WARNING
public
static mixed
$WARNING
= 2
$migrationOutput
private
IOutput
$migrationOutput
$occOutput
private
OutputInterface
$occOutput
Methods
__construct()
public
__construct() : mixed
Return values
mixed —alert()
public
alert(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —debug()
public
debug(string $message[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $serializable : array<string|int, mixed> = []
Return values
void —e()
public
e(Exception $e[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $e : Exception
- $serializable : array<string|int, mixed> = []
Return values
void —emergency()
public
emergency(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —exception()
public
exception(Exception $e[, int|array<string|int, mixed> $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $e : Exception
- $level : int|array<string|int, mixed> = 3
- $serializable : array<string|int, mixed> = []
Return values
void —finishMigrationProgress()
public
finishMigrationProgress() : void
Return values
void —generateRandomSentence()
public
generateRandomSentence([int $words = 5 ]) : string
Parameters
- $words : int = 5
Return values
string —generateRandomWord()
public
generateRandomWord([int $length = 8 ]) : string
Parameters
- $length : int = 8
Return values
string —getDateDiff()
public
getDateDiff(int $first, int $second[, bool $short = false ][, array<string|int, mixed> $words = [] ]) : string
Parameters
- $first : int
- $second : int
- $short : bool = false
- $words : array<string|int, mixed> = []
Tags
Return values
string —humanReadable()
public
humanReadable(int $bytes) : string
Parameters
- $bytes : int
Return values
string —log()
public
log(int $level, string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $level : int
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —logger()
public
logger() : LoggerInterface
Return values
LoggerInterface —notice()
public
notice(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —output()
public
output(string $message[, bool $advance = false ]) : void
Parameters
- $message : string
- $advance : bool = false
Return values
void —setMigrationOutput()
public
setMigrationOutput(IOutput $output) : void
Parameters
- $output : IOutput
Return values
void —setOccOutput()
public
setOccOutput(OutputInterface $output) : void
Parameters
- $output : OutputInterface
Return values
void —startMigrationProgress()
public
startMigrationProgress(int $int) : void
Parameters
- $int : int
Return values
void —t()
public
t(Throwable $t[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $t : Throwable
- $serializable : array<string|int, mixed> = []
Return values
void —throwable()
public
throwable(Throwable $t[, int $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $t : Throwable
- $level : int = 3
- $serializable : array<string|int, mixed> = []
Return values
void —warning()
public
warning(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —commonPart()
protected
commonPart(string $str1, string $str2[, bool $cs = true ]) : string
Parameters
- $str1 : string
- $str2 : string
- $cs : bool = true
-
case sensitive ?
Return values
string —cut()
protected
cut(string $line, int $length) : string
Parameters
- $line : string
- $length : int
Return values
string —feedStringWithParams()
protected
feedStringWithParams(string $line, array<string|int, mixed> $params) : string
Parameters
- $line : string
- $params : array<string|int, mixed>
Return values
string —isUuid()
protected
isUuid(string $uuid) : bool
Parameters
- $uuid : string
Return values
bool —token()
protected
token([int $length = 15 ]) : string
Parameters
- $length : int = 15
Return values
string —uuid()
Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
protected
uuid(int $length) : string
Parameters
- $length : int