lithium\console\Dispatcher::_call PHP Метод

_call() защищенный статический Метод

This method is responsible for calling a $callable command and returning its result.
protected static _call ( string $callable, string $request, string $params ) : mixed
$callable string The callable command.
$request string The associated `Request` object.
$params string Additional params that should be passed along.
Результат mixed Returns the result of the called action, typically `true` or `false`.
    protected static function _call($callable, $request, $params)
    {
        $params = compact('callable', 'request', 'params');
        return static::_filter(__FUNCTION__, $params, function ($self, $params) {
            if (is_callable($callable = $params['callable'])) {
                $request = $params['request'];
                $params = $params['params'];
                if (!method_exists($callable, $params['action'])) {
                    array_unshift($params['args'], $request->params['action']);
                    $params['action'] = 'run';
                }
                $isHelp = !empty($params['help']) || !empty($params['h']) || !method_exists($callable, $params['action']);
                if ($isHelp) {
                    $params['action'] = '_help';
                }
                return $callable($params['action'], $params['args']);
            }
            throw new UnexpectedValueException("Callable `{$callable}` is actually not callable.");
        });
    }