PHP Class SM\Callback\Callback

Inheritance: implements SM\Callback\CallbackInterface
Afficher le fichier Open project: winzou/state-machine Class Usage Examples

Protected Properties

Свойство Type Description
$callable mixed
$specs array

Méthodes publiques

Méthode Description
__construct ( array $specs, mixed $callable )
__invoke ( SM\Event\TransitionEvent $event ) {@inheritDoc}
call ( SM\Event\TransitionEvent $event ) : mixed
isSatisfiedBy ( SM\Event\TransitionEvent $event ) {@inheritDoc}

Méthodes protégées

Méthode Description
filterCallable ( callable | array $callable, SM\Event\TransitionEvent $event ) : callable
isSatisfiedByClause ( string $clause, string $value ) : boolean

Method Details

__construct() public méthode

public __construct ( array $specs, mixed $callable )
$specs array Specification for the Callback to be called
$callable mixed Closure or Callable that will be called if specifications pass

__invoke() public méthode

{@inheritDoc}
public __invoke ( SM\Event\TransitionEvent $event )
$event SM\Event\TransitionEvent

call() public méthode

public call ( SM\Event\TransitionEvent $event ) : mixed
$event SM\Event\TransitionEvent
Résultat mixed The returned value from the callback

filterCallable() protected méthode

protected filterCallable ( callable | array $callable, SM\Event\TransitionEvent $event ) : callable
$callable callable | array A callable or array with index 0 starting with "object" that will evaluated as a property path with "object" being the object undergoing the transition
$event SM\Event\TransitionEvent
Résultat callable

isSatisfiedBy() public méthode

{@inheritDoc}
public isSatisfiedBy ( SM\Event\TransitionEvent $event )
$event SM\Event\TransitionEvent

isSatisfiedByClause() protected méthode

protected isSatisfiedByClause ( string $clause, string $value ) : boolean
$clause string The clause to check (on, from or to)
$value string The value to check the clause against
Résultat boolean

Property Details

$callable protected_oe property

protected mixed $callable
Résultat mixed

$specs protected_oe property

protected array $specs
Résultat array