|
| __construct ($val, $fCode=0, $fString='', $valType='', $httpResponse=null) |
|
| __get ($name) |
|
| __isset ($name) |
|
| __set ($name, $value) |
|
| __unset ($name) |
|
| cookies () |
| Returns an array with the cookies received from the server.
|
|
| faultCode () |
| Returns the error code of the response.
|
|
| faultString () |
| Returns the error code of the response.
|
|
| getCharsetEncoder () |
|
| httpResponse () |
|
| serialize ($charsetEncoding='') |
| Returns xml representation of the response.
|
|
| setCharsetEncoder ($charsetEncoder) |
|
| value () |
| Returns the value received by the server.
|
|
|
| $content_type = 'text/xml' |
|
| $errno = 0 |
|
| $errstr = '' |
|
| $payload |
|
| $val = 0 |
|
| $valtyp |
|
|
| $httpResponse = array('headers' => array(), 'cookies' => array(), 'raw_data' => '', 'status_code' => null) |
|
◆ __construct()
PhpXmlRpc\Response::__construct |
( |
| $val, |
|
|
| $fCode = 0, |
|
|
| $fString = '', |
|
|
| $valType = '', |
|
|
| $httpResponse = null ) |
- Parameters
-
Value | string | mixed | $val | either a Value object, a php value or the xml serialization of an xmlrpc value (a string) |
integer | $fCode | set it to anything but 0 to create an error response. In that case, $val is discarded |
string | $fString | the error string, in case of an error response |
string | $valType | The type of $val passed in. Either 'xmlrpcvals', 'phpvals' or 'xml'. Leave empty to let the code guess the correct type. |
array | null | $httpResponse | |
- Todo
- add check that $val / $fCode / $fString is of correct type??? NB: as of now we do not do it, since it might be either an xmlrpc value or a plain php val, or a complete xml chunk, depending on usage of Client\send() inside which creator is called...
◆ cookies()
PhpXmlRpc\Response::cookies |
( |
| ) |
|
Returns an array with the cookies received from the server.
Array has the form: $cookiename => array ('value' => $val, $attr1 => $val1, $attr2 => $val2, ...) with attributes being e.g. 'expires', 'path', domain'. NB: cookies sent as 'expired' by the server (i.e. with an expiry date in the past) are still present in the array. It is up to the user-defined code to decide how to use the received cookies, and whether they have to be sent back with the next request to the server (using Client\setCookie) or not.
- Return values
-
array[] | array of cookies received from the server |
◆ faultCode()
PhpXmlRpc\Response::faultCode |
( |
| ) |
|
Returns the error code of the response.
- Return values
-
integer | the error code of this response (0 for not-error responses) |
◆ faultString()
PhpXmlRpc\Response::faultString |
( |
| ) |
|
Returns the error code of the response.
- Return values
-
string | the error string of this response ('' for not-error responses) |
◆ httpResponse()
PhpXmlRpc\Response::httpResponse |
( |
| ) |
|
- Return values
-
array | array with keys 'headers', 'cookies', 'raw_data' and 'status_code' |
◆ serialize()
PhpXmlRpc\Response::serialize |
( |
| $charsetEncoding = '' | ) |
|
Returns xml representation of the response.
XML prologue not included.
- Parameters
-
string | $charsetEncoding | the charset to be used for serialization. If null, US-ASCII is assumed |
- Return values
-
string | the xml representation of the response |
- Exceptions
-
◆ value()
PhpXmlRpc\Response::value |
( |
| ) |
|
Returns the value received by the server.
If the Response's faultCode is non-zero then the value returned by this method should not be used (it may not even be an object).
- Return values
-
Value|string|mixed | the Value object returned by the server. Might be an xml string or plain php value depending on the convention adopted when creating the Response |
◆ $val
PhpXmlRpc\Response::$val = 0 |
- Todo
- : do these need to be public?
The documentation for this class was generated from the following file:
- lib/phpxmlrpc/Response.php