src/Anonym/Route/ControllerDispatcher.php
public function dispatch()
    {

        $name = $this->generateClassName($this->namespace, $this->class);

        // the controller instance
        $controller = App::make($name);


        if ($controller instanceof Controller) {
            // register the parameters
            $controller->runControllerWithParameters(ParameterBag::getParameters());


            // return the instance
            return $controller;
        } else {
            throw new ControllerException(sprintf('%s is not a instance of  controller', $name));
        }
    }
public function dispatch()
    {

        $name = $this->generateClassName($this->namespace, $this->class);

        // the controller instance
        $controller = App::make($name);


        if ($controller instanceof Controller) {
            // register the parameters
            $controller->runControllerWithParameters(ParameterBag::getParameters());


            // return the instance
            return $controller;
        } else {
            throw new ControllerException(sprintf('%s is not a instance of  controller', $name));
        }
    }
public function dispatch ( ) { $ name = $ this -> generateClassName ( $ this -> namespace , $ this -> class ) ; // the controller instance $ controller = App :: make ( $ name ) ; if ( $ controller instanceof Controller ) { // register the parameters $ controller -> runControllerWithParameters ( ParameterBag :: getParameters ( ) ) ; // return the instance return $ controller ; } else { throw new ControllerException ( sprintf ( '%s is not a instance of  controller' , $ name ) ) ; } }
dispatch the controller

@throws ControllerException
@return \Anonym\Route\Controller
dispatch the controller