izzum\statemachine\State::callCallable PHP Method

callCallable() protected method

calls a $callable if it exists, with the arguments $context->getEntity()
protected callCallable ( callable $callable, Context $context, string $type = 'n/a' )
$callable callable
$context Context
$type string the type of callable (self::CALLABLE_ENTRY | self::CALLABLE_EXIT)
    protected function callCallable($callable, Context $context, $type = 'n/a')
    {
        if ($callable != self::CALLABLE_NULL) {
            Utils::checkCallable($callable, $type, $this, $context);
            call_user_func($callable, $context->getEntity());
        }
    }