Property | Type | Description | |
---|---|---|---|
$callbackFactory | SM\Callback\CallbackFactoryInterface | ||
$config | array | ||
$dispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
$object | object |
Method | Description | |
---|---|---|
__construct ( object $object, array $config, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher = null, SM\Callback\CallbackFactoryInterface $callbackFactory = null ) | ||
apply ( $transition, $soft = false ) | {@inheritDoc} | |
can ( $transition ) | {@inheritDoc} | |
getGraph ( ) | {@inheritDoc} | |
getObject ( ) | {@inheritDoc} | |
getPossibleTransitions ( ) | {@inheritDoc} | |
getState ( ) | {@inheritDoc} |
Method | Description | |
---|---|---|
callCallbacks ( SM\Event\TransitionEvent $event, string $position ) : boolean | Builds and calls the defined callbacks | |
setState ( string $state ) | Set a new state to the underlying object |
public __construct ( object $object, array $config, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher = null, SM\Callback\CallbackFactoryInterface $callbackFactory = null ) | ||
$object | object | Underlying object for the state machine |
$config | array | Config array of the graph |
$dispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | EventDispatcher or null not to dispatch events |
$callbackFactory | SM\Callback\CallbackFactoryInterface | CallbackFactory or null to use the default one |
protected callCallbacks ( SM\Event\TransitionEvent $event, string $position ) : boolean | ||
$event | SM\Event\TransitionEvent | |
$position | string | |
return | boolean |
protected CallbackFactoryInterface,SM\Callback $callbackFactory | ||
return | SM\Callback\CallbackFactoryInterface |
protected EventDispatcherInterface,Symfony\Component\EventDispatcher $dispatcher | ||
return | Symfony\Component\EventDispatcher\EventDispatcherInterface |