Bluz\Application\Application::dispatch PHP Method

dispatch() public method

Call dispatch from any \Bluz\Package Application::getInstance()->dispatch($module, $controller, array $params);
public dispatch ( string $module, string $controller, array $params = [] ) : Controller
$module string
$controller string
$params array
return Bluz\Controller\Controller
    public function dispatch($module, $controller, $params = [])
    {
        $this->preDispatch($module, $controller, $params);
        $result = $this->doDispatch($module, $controller, $params);
        $this->postDispatch($module, $controller, $params);
        return $result;
    }

Usage Example

Example #1
0
 /**
  * @param string $module
  * @param string $controller
  * @param array $params
  * @return \Bluz\Controller\Controller
  * @throws \Exception
  */
 public function dispatch($module, $controller, $params = [])
 {
     $this->dispatchModule = $module;
     $this->dispatchController = $controller;
     try {
         return parent::dispatch($module, $controller, $params);
     } catch (\Exception $e) {
         $this->setException($e);
         throw $e;
     }
 }
All Usage Examples Of Bluz\Application\Application::dispatch