src/Error/AppExceptionRenderer.php
protected function _getController()
    {
        $controller = parent::_getController();
        $cors = new CorsMiddleware();
        $controller->response = $cors(
            $controller->request, $controller->response,
            function($request, $response){ return $response; }
        );
        return $controller;
    }
protected function _getController()
    {
        $controller = parent::_getController();
        $cors = new CorsMiddleware();
        $controller->response = $cors(
            $controller->request, $controller->response,
            function($request, $response){ return $response; }
        );
        return $controller;
    }
protected function _getController ( ) { $ controller = parent :: _getController ( ) ; $ cors = new CorsMiddleware ( ) ; $ controller -> response = $ cors ( $ controller -> request , $ controller -> response , function ( $ request , $ response ) { return $ response ; } ) ; return $ controller ; }
Returns the current controller.

@return \Cake\Controller\Controller
Returns the current controller .