Class Stdin

Summary

Fully Qualified Name: Laminas\XmlRpc\Request\Stdin
Extends: Request

Description

XmlRpc Request object -- Request via STDIN

Extends {@link Laminas\XmlRpc\Request} to accept a request via STDIN. Request is built at construction time using data from STDIN; if no data is available, the request is declared a fault.

Methods

Name Description Defined By
__construct() Constructor Stdin
__toString() Return XML request Request
addParam() Add a parameter to the parameter stack Request
getEncoding() Retrieve current request encoding Request
getFault() Retrieve the fault response, if any Request
getMethod() Retrieve call method Request
getParams() Retrieve the array of parameters Request
getRawRequest() Retrieve the raw XML request Stdin
getTypes() Return parameter types Request
isFault() Does the current request contain errors and should it return a fault response? Request
loadXml() Load XML and parse into request components Request
saveXml() Create XML request Request
setEncoding() Set encoding to use in request Request
setMethod() Set method to call Request
setParams() Set the parameters array Request

Method Details

__construct()

Constructor

Attempts to read from php://stdin to get raw POST request; if an error occurs in doing so, or if the XML is invalid, the request is declared a fault.

Returns:

__toString()

Return XML request

Returns: string

addParam()

Add a parameter to the parameter stack

Adds a parameter to the parameter stack, associating it with the type $type if provided

Parameter Name Type Description
$value mixed
$type string Optional;

Returns: void

getEncoding()

Retrieve current request encoding

Returns: string

getFault()

Retrieve the fault response, if any

Returns: null|\Laminas\XmlRpc\Fault

getMethod()

Retrieve call method

Returns: string

getParams()

Retrieve the array of parameters

Returns: array

getRawRequest()

Retrieve the raw XML request

Returns: string

getTypes()

Return parameter types

Returns: array

isFault()

Does the current request contain errors and should it return a fault response?

Returns: bool

loadXml()

Load XML and parse into request components

Parameter Name Type Description
$request string

Returns: bool True on success, false if an error occurred.

saveXml()

Create XML request

Returns: string

setEncoding()

Set encoding to use in request

Parameter Name Type Description
$encoding string

Returns: \Laminas\XmlRpc\Request

setMethod()

Set method to call

Parameter Name Type Description
$method string

Returns: bool Returns true on success, false if method name is invalid

setParams()

Set the parameters array

If called with a single, array value, that array is used to set the parameters stack. If called with multiple values or a single non-array value, the arguments are used to set the parameters stack.

Best is to call with array of the format, in order to allow type hinting when creating the XMLRPC values for each parameter: $array = array(

array(
    'value' => $value,
    'type'  => $type
)[, ... ]

);

Returns: void

Top