trait LoggerAwareTrait

Trait that enabled logging.

Methods

bool
hasLogger()

Returns true if a logger instance is set.

LoggerInterface|null
getLogger()

Returns a logger instance or null.

$this
setLogger( LoggerInterface $logger = null)

Sets logger instance.

Details

at line line 31
final bool hasLogger()

Returns true if a logger instance is set.

Return Value

bool

at line line 41
final LoggerInterface|null getLogger()

Returns a logger instance or null.

Return Value

LoggerInterface|null

at line line 53
final $this setLogger( LoggerInterface $logger = null)

Sets logger instance.

Parameters

LoggerInterface $logger An instance of LoggerInterface

Return Value

$this