Aerys\Server::respond PHP Method

respond() private method

private respond ( InternalRequest $ireq )
$ireq InternalRequest
    private function respond(InternalRequest $ireq)
    {
        $ireq->client->pendingResponses++;
        if ($this->stopPromisor) {
            $this->tryApplication($ireq, [$this, "sendPreAppServiceUnavailableResponse"], []);
        } elseif (!in_array($ireq->method, $this->options->allowedMethods)) {
            $this->tryApplication($ireq, [$this, "sendPreAppMethodNotAllowedResponse"], []);
        } elseif (!($vhost = $this->vhosts->selectHost($ireq))) {
            $this->tryApplication($ireq, [$this, "sendPreAppInvalidHostResponse"], []);
        } elseif ($ireq->method === "TRACE") {
            $this->setTrace($ireq);
            $this->tryApplication($ireq, [$this, "sendPreAppTraceResponse"], []);
        } elseif ($ireq->method === "OPTIONS" && $ireq->uriRaw === "*") {
            $this->tryApplication($ireq, [$this, "sendPreAppOptionsResponse"], []);
        } else {
            $this->tryApplication($ireq, $vhost->getApplication(), $vhost->getFilters());
        }
    }