private function registerController(string $controllerClassName)
    {
        $controllerAnnotation = $this->getControllerAnnotation($controllerClassName);

        if ($controllerAnnotation instanceof Controller) {
            $controllerName = trim($controllerClassName, "\\");
            $this->app["$controllerName"] = function (Application $app) use ($controllerName) {
                return new $controllerName($app);
            };

            $this->processClassAnnotation($controllerAnnotation);
        }
    }
private function registerController(string $controllerClassName)
    {
        $controllerAnnotation = $this->getControllerAnnotation($controllerClassName);

        if ($controllerAnnotation instanceof Controller) {
            $controllerName = trim($controllerClassName, "\\");
            $this->app["$controllerName"] = function (Application $app) use ($controllerName) {
                return new $controllerName($app);
            };

            $this->processClassAnnotation($controllerAnnotation);
        }
    }
private function registerController ( string $ controllerClassName ) { $ controllerAnnotation = $ this -> getControllerAnnotation ( $ controllerClassName ) ; if ( $ controllerAnnotation instanceof Controller ) { $ controllerName = trim ( $ controllerClassName , "\\" ) ; $ this -> app [ "$controllerName" ] = function ( Application $ app ) use ( $ controllerName ) { return new $ controllerName ( $ app ) ; } ; $ this -> processClassAnnotation ( $ controllerAnnotation ) ; } }
Register the controller using the controller definition parsed from annotation.

@param string $controllerClassName
@throws InvalidArgumentException
Register the controller using the controller definition parsed from annotation .