Property | Type | Description | |
---|---|---|---|
$code | string | HTTP response code or 0 if no HTTP response was received | |
$codeStrings | array | HTTP response strings | |
$content | mixed | Content of the response body, decoded for supported content types | |
$headers | array | Associative array mapping response header names to their values | |
$message | string | Description of the HTTP response code or the error message if no HTTP response was received | |
$meta | array | Associative array containing other metadata about the response |
Method | Description | |
---|---|---|
getCode ( ) : string | Returns the HTTP response code. | |
getCodeAsString ( ) : string | Returns the HTTP response code text. | |
getContent ( ) : mixed | Returns the content of the response body. | |
getHeaders ( string $name = null ) : array | string | Returns all response headers or the value of a single specified response header. | |
getMessage ( ) : string | Returns the HTTP response description. | |
getMeta ( string $name = null ) : array | string | null | Returns all metadata or the value of a single specified metadatum. | |
isError ( ) : boolean | Returns whether the response indicates a client- or server-side error. | |
setCode ( string $code ) : Phergie_Plugin_Http_Response | Sets the HTTP response code. | |
setContent ( mixed $content ) : Phergie_Plugin_Http_Response | Sets the content of the response body. | |
setHeaders ( array $headers ) : Phergie_Plugin_Http_Response | Sets the response headers. | |
setMessage ( string $message ) : Phergie_Plugin_Http_Response | Sets the HTTP response description. | |
setMeta ( array $meta ) : Phergie_Plugin_Http_Response | Sets the response metadata. |
public getCodeAsString ( ) : string | ||
return | string | Response code text |
public getContent ( ) : mixed | ||
return | mixed | Response body content, decoded for supported content types |
public getHeaders ( string $name = null ) : array | string | ||
$name | string | Optional name of a single header for which the associated value should be returned |
return | array | string | Associative array of all header values, a string containing the value of the header indicated by $name if one is set, or null if one is not |
public getMessage ( ) : string | ||
return | string |
public getMeta ( string $name = null ) : array | string | null | ||
$name | string | Optional name of a single metadatum for which the associated value should be returned |
return | array | string | null | Associative array of all metadata values, a string containing the value of the metadatum indicated by $name if one is set, or null if one is not |
public setContent ( mixed $content ) : Phergie_Plugin_Http_Response | ||
$content | mixed | Response body content |
return | Phergie_Plugin_Http_Response | Provides a fluent interface |
public setHeaders ( array $headers ) : Phergie_Plugin_Http_Response | ||
$headers | array | Associative array of response headers indexed by header name |
return | Phergie_Plugin_Http_Response | Provides a fluent interface |
public setMessage ( string $message ) : Phergie_Plugin_Http_Response | ||
$message | string | Response description |
return | Phergie_Plugin_Http_Response | Provides a fluent interface |
protected string $code | ||
return | string |
protected static array $codeStrings | ||
return | array |
protected mixed $content | ||
return | mixed |
protected array $headers | ||
return | array |
protected string $message | ||
return | string |
protected array $meta | ||
return | array |