izzum\statemachine\Transition::callCallable PHP Method

callCallable() protected method

calls the $callable as part of the transition
protected callCallable ( callable $callable, Context $context, $type = 'n/a' )
$callable callable
$context Context
    protected function callCallable($callable, Context $context, $type = 'n/a')
    {
        //in case it is a guard callable we need to return true/false
        if ($callable != self::CALLABLE_NULL) {
            Utils::checkCallable($callable, $type, "transition: " . $this, $context);
            return (bool) call_user_func($callable, $context->getEntity());
        }
        return true;
    }