MessageHandler
extends AbstractHandler
in package
Debug message handler class
Tags
Table of Contents
Properties
- $logger : Logger|null
- Logger object
- $loggingParams : array<string|int, mixed>
- Logging params
- $messages : array<string|int, mixed>
- Messages
- $name : string|null
- Name of time measurement
Methods
- __construct() : mixed
- Constructor
- addMessage() : MessageHandler
- Add message
- getLogger() : Logger|null
- Get logger
- getLoggingParams() : array<string|int, mixed>
- Get logging params
- getMessages() : array<string|int, mixed>
- Get messages
- getName() : string|null
- Get name
- hasLogger() : bool
- Has logger
- hasLoggingParams() : bool
- Has logging parameters
- hasMessages() : bool
- Determine if the handler has messages
- hasName() : bool
- Has name
- log() : void
- Trigger handler logging
- prepare() : array<string|int, mixed>
- Prepare handler data for storage
- prepareAsString() : string
- Prepare handler data as string
- prepareHeaderAsString() : string
- Prepare header string
- setLogger() : AbstractHandler
- Set logger
- setLoggingParams() : AbstractHandler
- Set logger
- setName() : AbstractHandler
- Set name
Properties
$logger
Logger object
protected
Logger|null
$logger
= null
$loggingParams
Logging params
protected
array<string|int, mixed>
$loggingParams
= []
$messages
Messages
protected
array<string|int, mixed>
$messages
= []
$name
Name of time measurement
protected
string|null
$name
= null
Methods
__construct()
Constructor
public
__construct([string|null $name = null ][, Logger|null $logger = null ][, array<string|int, mixed> $loggingParams = [] ]) : mixed
Instantiate a handler object
Parameters
- $name : string|null = null
- $logger : Logger|null = null
- $loggingParams : array<string|int, mixed> = []
addMessage()
Add message
public
addMessage(string $message) : MessageHandler
Parameters
- $message : string
Return values
MessageHandlergetLogger()
Get logger
public
getLogger() : Logger|null
Return values
Logger|nullgetLoggingParams()
Get logging params
public
getLoggingParams() : array<string|int, mixed>
Return values
array<string|int, mixed>getMessages()
Get messages
public
getMessages() : array<string|int, mixed>
Return values
array<string|int, mixed>getName()
Get name
public
getName() : string|null
Return values
string|nullhasLogger()
Has logger
public
hasLogger() : bool
Return values
boolhasLoggingParams()
Has logging parameters
public
hasLoggingParams() : bool
Return values
boolhasMessages()
Determine if the handler has messages
public
hasMessages() : bool
Return values
boolhasName()
Has name
public
hasName() : bool
Return values
boollog()
Trigger handler logging
public
log() : void
Tags
prepare()
Prepare handler data for storage
public
prepare() : array<string|int, mixed>
Return values
array<string|int, mixed>prepareAsString()
Prepare handler data as string
public
prepareAsString() : string
Return values
stringprepareHeaderAsString()
Prepare header string
public
prepareHeaderAsString() : string
Return values
stringsetLogger()
Set logger
public
setLogger(Logger $logger) : AbstractHandler
Parameters
- $logger : Logger
Return values
AbstractHandlersetLoggingParams()
Set logger
public
setLoggingParams(array<string|int, mixed> $loggingParams) : AbstractHandler
Parameters
- $loggingParams : array<string|int, mixed>
Return values
AbstractHandlersetName()
Set name
public
setName(string $name) : AbstractHandler
Parameters
- $name : string