getStatusCode() 공개 메소드

Get the code for a given status text.
public getStatusCode ( string $statusText ) : string
$statusText string http status text
리턴 string Returns code for the given status text
예제 #1
0
 /**
  * Get the response with the status code from the payload.
  *
  * @param ResponseInterface $response
  * @param PayloadInterface $payload
  *
  * @return ResponseInterface
  */
 private function status(ResponseInterface $response, PayloadInterface $payload)
 {
     $status = $payload->getStatus();
     $code = $this->http_status->getStatusCode($status);
     return $response->withStatus($code);
 }