Bluz\Response\Response::getReasonPhrase PHP Method

getReasonPhrase() public method

Because a Reason-Phrase is not a required element in response Status-Line, the Reason-Phrase value MAY be null. Implementations MAY choose to return the default RFC 2616 recommended reason phrase for the response's Status-Code.
public getReasonPhrase ( ) : string | null
return string | null reason phrase, or null if unknown.
    public function getReasonPhrase()
    {
        return $this->phrase;
    }

Usage Example

Example #1
0
 /**
  * Test initial values of Response properties
  */
 public function testSetGetReasonPhrase()
 {
     $this->response->setReasonPhrase('OK');
     $this->assertEquals('OK', $this->response->getReasonPhrase());
 }