Representation of a response from Twitter.
Provides:
category | Zend |
---|---|
package | Zend_Service |
subpackage | |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(\Zend_Http_Response $httpResponse)
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
\Zend_Service_Twitter_Exception |
if unable to decode JSON response |
---|
__get(string $name) : mixed
If a named property exists within the JSON response returned, proxies to it. Otherwise, returns null.
string
mixed
getErrors() : array
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 |
---|
array
getRawResponse() : string
string
isError() : boolean
boolean
isSuccess() : boolean
boolean
toValue() : array | \stdClass
array
\stdClass
$httpResponse : \Zend_Http_Response
$jsonBody : array | \stdClass
$rawBody : string