Open Monograph Press  3.3.0
PhpXmlRpc\Request Class Reference

Public Member Functions

 __construct ($methodName, $params=array())
 
 addParam ($param)
 
 createPayload ($charsetEncoding='')
 
 getNumParams ()
 
 getParam ($i)
 
 kindOf ()
 
 method ($methodName='')
 
 parseResponse ($data='', $headersProcessed=false, $returnType='xmlrpcvals')
 
 parseResponseFile ($fp)
 
 serialize ($charsetEncoding='')
 
 setDebug ($in)
 
 xml_footer ()
 
 xml_header ($charsetEncoding='')
 

Data Fields

 $content_type = 'text/xml'
 
 $debug = 0
 
 $methodname
 
 $params = array()
 
 $payload
 

Protected Attributes

 $httpResponse = array()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

PhpXmlRpc\Request::__construct (   $methodName,
  $params = array() 
)
Parameters
string$methodNamethe name of the method to invoke
Value[]$paramsarray of parameters to be passed to the method (Value objects)

Definition at line 26 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

Member Function Documentation

◆ addParam()

PhpXmlRpc\Request::addParam (   $param)

Add a parameter to the list of parameters to be used upon method invocation.

Parameters
Value$param
Returns
boolean false on failure

Definition at line 103 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ createPayload()

PhpXmlRpc\Request::createPayload (   $charsetEncoding = '')

◆ getNumParams()

PhpXmlRpc\Request::getNumParams ( )

Returns the number of parameters in the message.

Returns
integer the number of parameters currently set

Definition at line 132 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ getParam()

PhpXmlRpc\Request::getParam (   $i)

Returns the nth parameter in the request. The index zero-based.

Parameters
integer$ithe index of the parameter to fetch (zero based)
Returns
Value the i-th parameter

Definition at line 122 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ kindOf()

PhpXmlRpc\Request::kindOf ( )

Kept the old name even if Request class was renamed, for compatibility.

Returns
string

Definition at line 365 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ method()

PhpXmlRpc\Request::method (   $methodName = '')

Gets/sets the xmlrpc method to be invoked.

Parameters
string$methodNamethe method to be set (leave empty not to set it)
Returns
string the method that will be invoked

Definition at line 73 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ parseResponse()

PhpXmlRpc\Request::parseResponse (   $data = '',
  $headersProcessed = false,
  $returnType = 'xmlrpcvals' 
)

Parse the xmlrpc response contained in the string $data and return a Response object.

Parameters
string$datathe xmlrpc response, eventually including http headers
bool$headersProcessedwhen true prevents parsing HTTP headers for interpretation of content-encoding and consequent decoding
string$returnTypedecides return type, i.e. content of response->value(). Either 'xmlrpcvals', 'xml' or 'phpvals'
Returns
Response

Definition at line 170 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ parseResponseFile()

PhpXmlRpc\Request::parseResponseFile (   $fp)

Given an open file handle, read all data available and parse it as an xmlrpc response. NB: the file handle is not closed by this function. NNB: might have trouble in rare cases to work on network streams, as we check for a read of 0 bytes instead of feof($fp). But since checking for feof(null) returns false, we would risk an infinite loop in that case, because we cannot trust the caller to give us a valid pointer to an open file...

Parameters
resource$fpstream pointer
Returns
Response
Todo:
add 2nd & 3rd param to be passed to ParseResponse() ???

Definition at line 152 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ serialize()

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

Returns xml representation of the message. XML prologue included.

Parameters
string$charsetEncoding
Returns
string the xml representation of the message, xml prologue included

Definition at line 89 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ setDebug()

PhpXmlRpc\Request::setDebug (   $in)

Enables/disables the echoing to screen of the xmlrpc responses received.

Parameters
integer$invalues 0, 1, 2 are supported

Definition at line 375 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.

◆ xml_footer()

PhpXmlRpc\Request::xml_footer ( )

◆ xml_header()

PhpXmlRpc\Request::xml_header (   $charsetEncoding = '')

Field Documentation

◆ $content_type

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

◆ $debug

PhpXmlRpc\Request::$debug = 0

◆ $httpResponse

PhpXmlRpc\Request::$httpResponse = array()
protected

◆ $methodname

PhpXmlRpc\Request::$methodname

◆ $params

PhpXmlRpc\Request::$params = array()

◆ $payload

PhpXmlRpc\Request::$payload
Todo:
: do these need to be public?

Definition at line 13 of file generic/plagiarism/vendor/phpxmlrpc/phpxmlrpc/src/Request.php.


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