프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 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 $event | ||
리턴 | string |
protected string $rule | ||
리턴 | string |
protected State,izzum\statemachine $state_from | ||
리턴 |