class StateMachine extends Workflow
__construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, string $name = 'unnamed') | ||
Marking | getMarking(object $subject) Returns the object's Marking. | from Workflow |
bool | can(object $subject, string $transitionName) Returns true if the transition is enabled. | from Workflow |
Marking | apply(object $subject, string $transitionName) Fire a transition. | from Workflow |
Transition[] | getEnabledTransitions(object $subject) Returns all enabled transitions. | from Workflow |
getName() | from Workflow | |
Definition | getDefinition() | from Workflow |
MarkingStoreInterface | getMarkingStore() | from Workflow |
Definition | $definition | |
MarkingStoreInterface | $markingStore | |
EventDispatcherInterface | $dispatcher | |
string | $name |
Returns the object's Marking.
object | $subject | A subject |
Marking | The Marking |
LogicException |
Returns true if the transition is enabled.
object | $subject | A subject |
string | $transitionName | A transition |
bool | true if the transition is enabled |
Fire a transition.
object | $subject | A subject |
string | $transitionName | A transition |
Marking | The new Marking |
LogicException | If the transition is not applicable |
LogicException | If the transition does not exist |
Returns all enabled transitions.
object | $subject | A subject |
Transition[] | All enabled transitions |
Definition |
MarkingStoreInterface |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Workflow/StateMachine.html