Cake\Controller\Controller::shutdownProcess PHP Метод

shutdownProcess() публичный Метод

Fire the Components and Controller callbacks in the correct order. - triggers the component shutdown callback. - calls the Controller's afterFilter method.
public shutdownProcess ( ) : Response | null
Результат Cake\Network\Response | null
    public function shutdownProcess()
    {
        $event = $this->dispatchEvent('Controller.shutdown');
        if ($event->result instanceof Response) {
            return $event->result;
        }
    }

Usage Example

 protected function _invoke(Controller $controller)
 {
     $result = $controller->startupProcess();
     if ($result instanceof Response) {
         return $result;
     }
     $response = $controller->invokeAction();
     if ($response !== null && !$response instanceof Response) {
         throw new LogicException('Controller actions can only Cake\\Network\\Response instances');
     }
     if (!$response && $controller->autoRender) {
         $response = $controller->render();
     } elseif (!$response) {
         $response = $controller->response;
     }
     $result = $controller->shutdownProcess();
     if ($result instanceof Response) {
         return $result;
     }
     return $response;
 }
All Usage Examples Of Cake\Controller\Controller::shutdownProcess