Retrieves status code for the current web response.
public getStatusCode ( ) : integer | ||
Résultat | integer | Status code |
/** * Convert the symfony 1.4 response to a Response. * @param \sfWebResponse $legacyResponse * @return Response */ private function convertResponse($legacyResponse) { $response = new Response($legacyResponse->getContent(), $legacyResponse->getStatusCode()); $response->setCharset($legacyResponse->getCharset()); $response->setStatusCode($legacyResponse->getStatusCode()); foreach ($legacyResponse->getHttpHeaders() as $headerName => $headerValue) { $response->headers->set($headerName, $headerValue); } return $response; }