state() public method

The response state is a bitmask of the following flags: - Response::NONE - Response::STARTED - Response::STREAMING - Response::ENDED
public state ( ) : integer
return integer
Exemplo n.º 1
0
 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);
     }
 }