src/Routing/ControllerDispatcher.php
/**
	 * Dispatches the controller and returns the response.
	 *
	 * @return mixed
	 * @throws HttpResponseException
	 */
Dispatches the controller and returns the response.
@return mixed
@throws HttpResponseException
Dispatches the controller and returns the response . @return mixed @throws HttpResponseException
public function dispatch() {
		$action = $this->getCallable();
		if (is_null($this->response)) {
			$this->response = Application::kernel()->http()->response();
		}
		if (is_callable($action)) {
			$this->init($action);
			if (!$this->response->isHalted()) {
				$callable = $this->createBoundCallable($action);
				return $callable->execute();
			}
		}
		return null;
	}
public function dispatch ( ) { $ action = $ this -> getCallable ( ) ; if ( is_null ( $ this -> response ) ) { $ this -> response = Application :: kernel ( ) -> http ( ) -> response ( ) ; } if ( is_callable ( $ action ) ) { $ this -> init ( $ action ) ; if ( ! $ this -> response -> isHalted ( ) ) { $ callable = $ this -> createBoundCallable ( $ action ) ; return $ callable -> execute ( ) ; } } return null ; }
Dispatches the controller and returns the response.
Dispatches the controller and returns the response .
// Create a new service-bound callable // Run the callable