Zend Framework
1.12
|
Public Member Functions | |
__construct (Zend_Http_Response $httpResponse) | |
Constructor. | |
__get ($name) | |
Property overloading to JSON elements. | |
isSuccess () | |
Was the request successful? | |
isError () | |
Did an error occur in the request? | |
getErrors () | |
Retrieve the errors. | |
getRawResponse () | |
Retrieve the raw response body. | |
toValue () | |
Retun the decoded response body. | |
Protected Attributes | |
$httpResponse | |
$jsonBody | |
$rawBody | |
__construct | ( | Zend_Http_Response | $httpResponse | ) |
Constructor.
Assigns the HTTP response to a property, as well as the body representation. It then attempts to decode the body as JSON.
Zend_Http_Response | $httpResponse |
Zend_Service_Twitter_Exception | if unable to decode JSON response |
__get | ( | $name | ) |
Property overloading to JSON elements.
If a named property exists within the JSON response returned, proxies to it. Otherwise, returns null.
string | $name |
getErrors | ( | ) |
Retrieve the errors.
Twitter _should_ return a standard error object, which contains an "errors" property pointing to an array of errors. This method will return that array if present, and raise an exception if not detected.
If the response was successful, an empty array is returned.
Exception\DomainException | if unable to detect structure of error response |
getRawResponse | ( | ) |
Retrieve the raw response body.
isError | ( | ) |
Did an error occur in the request?
isSuccess | ( | ) |
Was the request successful?
toValue | ( | ) |
Retun the decoded response body.
|
protected |
|
protected |
|
protected |