Security Aware state machine.
Use the Symfony Security Component and ACL.
Need an ACL implementation available, Doctrine DBAL by default.
Inherits from: ListenableStateMachine
StatefulInterface | $object | The stateful object |
array | $states | The available states |
array | $transitions | The available transitions |
StateInterface | $currentState | The current state |
setEventDispatcher( EventDispatcherInterface $dispatcher) | from ListenableStateMachine | |
initialize()
Initialize the State Machine current state |
from ListenableStateMachine | |
mixed |
apply( string $transitionName)
Apply a transition |
from ListenableStateMachine |
setSecurityContext( SecurityContextInterface $securityContext) | ||
can($transition) |
public
setEventDispatcher( EventDispatcherInterface $dispatcher)
Parameters |
|
---|
public
initialize()
Initialize the State Machine current state
public mixed
apply( string $transitionName)
Apply a transition
Parameters |
|
|||
---|---|---|---|---|
Return Value |
|
public
setSecurityContext( SecurityContextInterface $securityContext)
Parameters |
|
---|
public
can($transition)
Parameters |
|
---|