protected function middleware($middlewareClass, ...$params)
    {
        $middleware = new $middlewareClass(static::class, ...$params);

        $this->{Services::APP}->attach($middleware);

        return $middleware;
    }
protected function middleware($middlewareClass, ...$params)
    {
        $middleware = new $middlewareClass(static::class, ...$params);

        $this->{Services::APP}->attach($middleware);

        return $middleware;
    }
protected function middleware ( $ middlewareClass , ... $ params ) { $ middleware = new $ middlewareClass ( static :: class , ... $ params ) ; $ this -> { Services :: APP } -> attach ( $ middleware ) ; return $ middleware ; }
Attach a ControllerMiddleware.

On controllers, only ControllerMiddleware are attachable,
because the middleware registration, passed by the controller, will made at the controller instantiation.
Because of this, the events
"Application::boot"
"Dispatch::beforeDispatchLoop"
"Dispatch::BeforeDispatch"
can not be caught.

@param string $middlewareClass
@param mixed  ...$params

@return \Neutrino\Foundation\Middleware\Controller
Attach a ControllerMiddleware .