Open Monograph Press  3.3.0
PhpXmlRpc\Response Class Reference

Public Member Functions

 __construct ($val, $fCode=0, $fString='', $valType='')
 
 cookies ()
 
 faultCode ()
 
 faultString ()
 
 serialize ($charsetEncoding='')
 
 value ()
 

Data Fields

 $_cookies = array()
 
 $content_type = 'text/xml'
 
 $errno = 0
 
 $errstr = ''
 
 $hdrs = array()
 
 $payload
 
 $raw_data = ''
 
 $val = 0
 
 $valType
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

PhpXmlRpc\Response::__construct (   $val,
  $fCode = 0,
  $fString = '',
  $valType = '' 
)
Parameters
mixed$valeither an xmlrpc value obj, a php value or the xml serialization of an xmlrpc value (a string)
integer$fCodeset it to anything but 0 to create an error response
string$fStringthe error string, in case of an error response
string$valTypeeither 'xmlrpcvals', 'phpvals' or 'xml'
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...

Definition at line 30 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Response.php.

Member Function Documentation

◆ 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.

Returns
array array of cookies received from the server

Definition at line 96 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Response.php.

◆ faultCode()

PhpXmlRpc\Response::faultCode ( )

Returns the error code of the response.

Returns
integer the error code of this response (0 for not-error responses)

Definition at line 60 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Response.php.

◆ faultString()

PhpXmlRpc\Response::faultString ( )

Returns the error code of the response.

Returns
string the error string of this response ('' for not-error responses)

Definition at line 70 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Response.php.

◆ serialize()

PhpXmlRpc\Response::serialize (   $charsetEncoding = '')

Returns xml representation of the response. XML prologue not included.

Parameters
string$charsetEncodingthe charset to be used for serialization. if null, US-ASCII is assumed
Returns
string the xml representation of the response
Exceptions

Definition at line 110 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Response.php.

◆ value()

PhpXmlRpc\Response::value ( )

Returns the value received by the server.

Returns
Value|string|mixed the xmlrpc value object returned by the server. Might be an xml string or php value if the response has been created by specially configured Client objects

Definition at line 80 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Response.php.

Field Documentation

◆ $_cookies

PhpXmlRpc\Response::$_cookies = array()

◆ $content_type

PhpXmlRpc\Response::$content_type = 'text/xml'

◆ $errno

PhpXmlRpc\Response::$errno = 0

◆ $errstr

PhpXmlRpc\Response::$errstr = ''

◆ $hdrs

PhpXmlRpc\Response::$hdrs = array()

◆ $payload

PhpXmlRpc\Response::$payload

◆ $raw_data

PhpXmlRpc\Response::$raw_data = ''

◆ $val

PhpXmlRpc\Response::$val = 0
Todo:
: do these need to be public?

Definition at line 10 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Response.php.

◆ $valType

PhpXmlRpc\Response::$valType

The documentation for this class was generated from the following file: