PHP Class Metabor\Statemachine\Observer\TransitionLogger

Author: otischlinger
Inheritance: implements SplObserver
Exibir arquivo Open project: metabor/statemachine Class Usage Examples

Protected Properties

Property Type Description
$logger Psr\Log\LoggerInterface
$loggerLevel string

Public Methods

Method Description
__construct ( Psr\Log\LoggerInterface $logger, string $loggerLevel = LogLevel::INFO, MetaborStd\StringConverterInterface $stringConverter = null )
update ( SplSubject $stateMachine )

Protected Methods

Method Description
createLoggerContext ( MetaborStd\Statemachine\StatemachineInterface $stateMachine ) : array
createLoggerMessage ( array $context ) : string

Method Details

__construct() public method

public __construct ( Psr\Log\LoggerInterface $logger, string $loggerLevel = LogLevel::INFO, MetaborStd\StringConverterInterface $stringConverter = null )
$logger Psr\Log\LoggerInterface
$loggerLevel string
$stringConverter MetaborStd\StringConverterInterface

createLoggerContext() protected method

protected createLoggerContext ( MetaborStd\Statemachine\StatemachineInterface $stateMachine ) : array
$stateMachine MetaborStd\Statemachine\StatemachineInterface
return array

createLoggerMessage() protected method

protected createLoggerMessage ( array $context ) : string
$context array
return string

update() public method

See also: SplObserver::update()
public update ( SplSubject $stateMachine )
$stateMachine SplSubject

Property Details

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface

$loggerLevel protected_oe property

protected string $loggerLevel
return string