Property | Type | Description | |
---|---|---|---|
$body | |||
$headers | |||
$protocol | |||
$rawHeaders | |||
$statusCode |
Method | Description | |
---|---|---|
__construct ( String $response ) | Constructs a new object from an existing HTTP response. | |
__toString ( ) | ||
getBody ( ) : String | Returns the body of the response. | |
getCookies ( ) : array | Returns the cookies set in the current response. | |
getHeader ( string $header ) : string | Returns the value of the specified header. | |
getProtocol ( ) : string | Returns the protocol used to communicate with the client. | |
getResponse ( ) : String | Returns the whole response. | |
getStatusCode ( ) : String | Returns the status code of the response. | |
getValidStatusCodes ( ) : String | Returns an array for the HTTP status codes that are considered as valid responses. |
Method | Description | |
---|---|---|
buildHeaders ( string $headers ) | Builds headers array from a well-formatted string. | |
getRawHeaders ( ) : string | Returns all the headers as a string. | |
setProtocol ( string $protocol ) | Sets the protocol used for the communication with the client. | |
setStatusCode ( integer $code ) | Sets the status code of the response. |
public __construct ( String $response ) | ||
$response | String |
protected buildHeaders ( string $headers ) | ||
$headers | string |
public getCookies ( ) : array | ||
return | array |
public getProtocol ( ) : string | ||
return | string |
protected getRawHeaders ( ) : string | ||
return | string |
public getResponse ( ) : String | ||
return | String |
public getStatusCode ( ) : String | ||
return | String |
public getValidStatusCodes ( ) : String | ||
return | String |
protected setProtocol ( string $protocol ) | ||
$protocol | string |
protected setStatusCode ( integer $code ) | ||
$code | integer |