Aerys\Response::state PHP 메소드

state() 공개 메소드

The response state is a bitmask of the following flags: - Response::NONE - Response::STARTED - Response::STREAMING - Response::ENDED
public state ( ) : integer
리턴 integer
    public function state() : int;

Usage Example

예제 #1
0
파일: Server.php 프로젝트: amphp/aerys
 private function onApplicationError(\Throwable $error, InternalRequest $ireq, Response $response, array $filters)
 {
     $this->logger->error($error);
     if ($ireq->client->isDead & Client::CLOSED_WR || $ireq->client->isExported) {
         // Responder actions may catch an initial ClientException and continue
         // doing further work. If an error arises at this point our only option
         // is to log the error (which we just did above).
         return;
     } elseif ($response->state() & Response::STARTED) {
         $this->close($ireq->client);
     } elseif (empty($ireq->filterErrorFlag)) {
         $this->tryErrorResponse($error, $ireq, $response, $filters);
     } else {
         $this->tryFilterErrorResponse($error, $ireq, $filters);
     }
 }