class Workflow

Methods

__construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, $name = 'unnamed')

No description

getMarking(object $subject)

Returns the object's Marking.

bool
can(object $subject, string $transitionName)

Returns true if the transition is enabled.

apply(object $subject, string $transitionName)

Fire a transition.

getEnabledTransitions(object $subject)

Returns all enabled transitions.

getName()

No description

getDefinition()

No description

Details

at line line 33
__construct(Definition $definition, MarkingStoreInterface $markingStore = null, EventDispatcherInterface $dispatcher = null, $name = 'unnamed')

Parameters

Definition $definition
MarkingStoreInterface $markingStore
EventDispatcherInterface $dispatcher
$name

at line line 50
Marking getMarking(object $subject)

Returns the object's Marking.

Parameters

object $subject A subject

Return Value

Marking The Marking

Exceptions

LogicException

at line line 93
bool can(object $subject, string $transitionName)

Returns true if the transition is enabled.

Parameters

object $subject A subject
string $transitionName A transition

Return Value

bool true if the transition is enabled

at line line 117
Marking apply(object $subject, string $transitionName)

Fire a transition.

Parameters

object $subject A subject
string $transitionName A transition

Return Value

Marking The new Marking

Exceptions

LogicException If the transition is not applicable
LogicException If the transition does not exist

at line line 160
Transition[] getEnabledTransitions(object $subject)

Returns all enabled transitions.

Parameters

object $subject A subject

Return Value

Transition[] All enabled transitions

at line line 174
getName()

at line line 182
Definition getDefinition()

Return Value

Definition