lithium\action\Dispatcher::_call()

protected static method

Invokes the callable object returned by _callable(), and returns the results, usually a Response object instance.

Parameters

  • object $callable

    Typically a closure or instance of lithium\action\Controller.

  • object $request

    An instance of lithium\action\Request.

  • array $params

    An array of parameters to pass to $callable, along with $request.

Returns

mixed

Returns the return value of $callable, usually an instance of lithium\action\Response.

Filter

This method can be filtered.

Source

	protected static function _call($callable, $request, $params) {
		$params = compact('callable', 'request', 'params');
		return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) {
			if (is_callable($callable = $params['callable'])) {
				return $callable($params['request'], $params['params']);
			}
			throw new DispatchException('Result not callable.');
		});
	}