Свойство | Тип | Описание | |
---|---|---|---|
$callable_guard | callable | the callable to call as part of the transition guard (should return a boolean) | |
$callable_transition | callable | the callable to call as part of the transition logic | |
$command | string | This can actually be a ',' seperated string of multiple commands. | |
$description | string | a description for the state | |
$event | string | an event code that can trigger this transitions | |
$rule | string | This can actually be a ',' seperated string of multiple rules. | |
$state_from | the state this transition starts from | ||
$state_to | the state this transition points to |
Метод | Описание | |
---|---|---|
__construct ( |
||
__toString ( ) : string | ||
can ( |
is a transition possible? Check the guard Rule with the domain object injected. | |
getCommand ( |
returns the associated Command for this Transition. | |
getCommandName ( ) : string | return the command name(s). | |
getCopy ( |
for transitions that contain regex states, we need to be able to copy an existing (subclass of this) transition with all it's fields. | |
getDescription ( ) : string | get the description for this transition (if any) | |
getEvent ( ) : string | get the event name by which this transition can be triggered | |
getGuardCallable ( ) : callable | returns the callable for the guard logic. | |
getName ( ) : string | get the transition name. | |
getRule ( |
returns the associated Rule for this Transition, configured with a 'reference' (stateful) object | |
getRuleName ( ) | ||
getStateFrom ( ) : |
get the state this transition points from | |
getStateTo ( ) : |
get the state this transition points to | |
getTransitionCallable ( ) : callable | returns the callable for the transition logic. | |
isTriggeredBy ( string $event ) : boolean | Can this transition be triggered by a certain event? This also matches on the transition name. | |
process ( |
Process the transition for the statemachine and execute the associated Command with the domain object injected. | |
setCommandName ( $command ) | ||
setDescription ( string $description ) | set the description of the transition (for uml generation for example) | |
setEvent ( string $event ) | set the event name by which this transition can be triggered. | |
setGuardCallable ( callable $callable ) | the callable to call as part of the transition guard | |
setRuleName ( $rule ) | ||
setTransitionCallable ( callable $callable ) | the callable to call as part of the transition logic | |
toString ( ) : string |
Метод | Описание | |
---|---|---|
callCallable ( callable $callable, |
calls the $callable as part of the transition |
public __construct ( |
||
$state_from | ||
$state_to | ||
$event | string | optional: an event name by which this transition can be triggered |
$rule | string | optional: one or more fully qualified Rule (sub)class name(s) to check to see if we are allowed to transition. This can actually be a ',' seperated string of multiple rules that will be applied as a chained 'and' rule. |
$command | string | optional: one or more fully qualified Command (sub)class name(s) to execute for a transition. This can actually be a ',' seperated string of multiple commands that will be executed as a composite. |
$callable_guard | callable | optional: a php callable to call. eg: "function(){echo 'closure called';};" |
$callable_transition | callable | optional: a php callable to call. eg: "izzum\MyClass::myStaticMethod" |
protected callCallable ( callable $callable, |
||
$callable | callable | |
$context |
public getCommand ( |
||
$context | ||
Результат | izzum\command\ICommand |
public getCommandName ( ) : string | ||
Результат | string |
public getCopy ( |
||
$from | ||
$to | ||
Результат |
public getDescription ( ) : string | ||
Результат | string |
public getGuardCallable ( ) : callable | ||
Результат | callable | or null |
public getRule ( |
||
$context | the associated Context for a our statemachine | |
Результат | izzum\rules\IRule | a Rule or chained AndRule if the rule input was a ',' seperated string of rules. |
public getStateFrom ( ) : |
||
Результат |
public getStateTo ( ) : |
||
Результат |
public getTransitionCallable ( ) : callable | ||
Результат | callable | or null |
public isTriggeredBy ( string $event ) : boolean | ||
$event | string | |
Результат | boolean |
public setDescription ( string $description ) | ||
$description | string |
public setGuardCallable ( callable $callable ) | ||
$callable | callable |
public setTransitionCallable ( callable $callable ) | ||
$callable | callable |
protected callable $callable_guard | ||
Результат | callable |
protected callable $callable_transition | ||
Результат | callable |
protected string $command | ||
Результат | string |
protected string $description | ||
Результат | string |
protected string $event | ||
Результат | string |
protected string $rule | ||
Результат | string |
protected State,izzum\statemachine $state_from | ||
Результат |