Метод | Описание | |
---|---|---|
checkCallable ( callable $callable, string $type, string $info, |
||
checkConfiguration ( |
Checks a fully loaded statemachine for a valid configuration. | |
getAllRegexMatchingStates ( |
get all states that match a possible regex state from the set of states provided | |
getCommand ( string $command_name, |
returns the associated Command for the entry/exit/transition action on a State or a Transition. | |
getTransitionName ( string $from, string $to ) : string | gets the transition name by two state names, using the default convention for a transition name (which is concatenating state-from to state-to with '_to_') | |
matchesRegex ( |
does an input regex state match a target states' name? | |
wrapToStateMachineException ( Exception $e, integer $code, $throw = false ) : |
Always returns an izzum exception (converts a non-izzum exception to an izzum exception). |
Метод | Описание | |
---|---|---|
getExceptionForCheckingCallable ( callable $callable, string $type, string $info, |
public static checkCallable ( callable $callable, string $type, string $info, |
||
$callable | callable | |
$type | string | a type description of the callable eg: State::CALLABLE_ENTRY |
$info | string | extra info for exception message purposes |
$context | optional: the context the callable is called in | |
Результат | boolean |
public static checkConfiguration ( |
||
$machine | ||
Результат | an array of exceptions if anything is wrong with the configuration |
public static getAllRegexMatchingStates ( |
||
$regex | a possible regex state. | |
$targets | all target State instances that we check the regex against. | |
Результат | an array of State instances from the $targets State instances that matched the (negated) regex, or the $regex State if it was not a regex State after all. |
public static getCommand ( string $command_name, |
||
$command_name | string | entry~,exit~ or transition command name. multiple commands can be split by a ',' in which case a composite command will be returned. |
$context | to be able to get the entity | |
Результат | izzum\command\ICommand |
public static matchesRegex ( |
||
$regex | the regex state | |
$target | the state to match the regular expression to | |
Результат | boolean |
public static wrapToStateMachineException ( Exception $e, integer $code, $throw = false ) : |
||
$e | Exception | |
$code | integer | |
Результат |