class APIResponse
Response object from a Phraseanet API call
Methods
__construct(stdClass $response) | ||
stdClass |
getResult()
Returns the result of the response |
|
integer |
getStatusCode()
Returns the HTTP code |
|
Boolean |
isOk()
Returns true is the response is successful |
|
Boolean |
isEmpty()
Returns true if the response content is empty |
|
string|null |
getErrorMessage()
Returns the error message |
|
string|null |
getErrorDetails()
Returns error details |
|
DateTime |
getResponseTime()
Returns the response datetime |
|
string |
getUri()
Returns the requested URI |
|
string |
getMethod()
Returns the requested method |
|
string |
getCharset()
Returns the response charset |
|
string |
getApiVersion()
Returns the API version |
|
Boolean |
hasProperty(string $property)
Returns true if the response has the given property |
|
Boolean |
getProperty(string $property)
Returns the response property, null if the property does not exist |
Details
at line 30
public
__construct(stdClass $response)
at line 45
public stdClass
getResult()
Returns the result of the response
at line 55
public integer
getStatusCode()
Returns the HTTP code
at line 65
public Boolean
isOk()
Returns true is the response is successful
at line 75
public Boolean
isEmpty()
Returns true if the response content is empty
at line 85
public string|null
getErrorMessage()
Returns the error message
at line 95
public string|null
getErrorDetails()
Returns error details
at line 105
public DateTime
getResponseTime()
Returns the response datetime
at line 115
public string
getUri()
Returns the requested URI
at line 127
public string
getMethod()
Returns the requested method
at line 139
public string
getCharset()
Returns the response charset
at line 149
public string
getApiVersion()
Returns the API version
at line 161
public Boolean
hasProperty(string $property)
Returns true if the response has the given property
at line 173
public Boolean
getProperty(string $property)
Returns the response property, null if the property does not exist