An XML-RPC client implementation

package Default

 Methods

Create a new XML-RPC client to a remote server

__construct(string $server, \Zend\Http\Client $httpClient = null

Parameters

$server

string

Full address of the XML-RPC service (e.g. http://time.xmlrpc.com/RPC2)

$httpClient

\Zend\Http\Client

HTTP Client to use for requests

Send an XML-RPC request to the service (for a specific method)

call(string $method, array $params = array()) : mixed

Unified interface for calling custom remote methods.

inherited_from \Zend\Server\Client::call()

Parameters

$method

string

Name of the method we want to call

$params

array

Array of parameters for the method

Exceptions

\Zend\XmlRpc\Client\Exception\FaultException

Returns

mixed

Perform an XML-RPC request and return a response.

doRequest(\Zend\XmlRpc\Request $request, null|\Zend\XmlRpc\Response $response = null) : void

Parameters

$request

\Zend\XmlRpc\Request

$response

null\Zend\XmlRpc\Response

Exceptions

\Zend\XmlRpc\Client\Exception\HttpException

Gets the HTTP client object.

getHttpClient() : \Zend\Http\Client

Returns

\Zend\Http\Client

Gets the introspection object.

getIntrospector() : \Zend\XmlRpc\Client\ServerIntrospection

Returns

\Zend\XmlRpc\Client\ServerIntrospection

The request of the last method call

getLastRequest() : \Zend\XmlRpc\Request

Returns

\Zend\XmlRpc\Request

The response received from the last method call

getLastResponse() : \Zend\XmlRpc\Response

Returns

\Zend\XmlRpc\Response

Returns a proxy object for more convenient method calls

getProxy(string $namespace = '') : \Zend\XmlRpc\Client\ServerProxy

Parameters

$namespace

string

Namespace to proxy or empty string for none

Returns

\Zend\XmlRpc\Client\ServerProxy

Sets the HTTP client object to use for connecting the XML-RPC server.

setHttpClient(\Zend\Http\Client $httpClient) : \Zend\Http\Client

Parameters

$httpClient

\Zend\Http\Client

Returns

\Zend\Http\Client

Sets the object used to introspect remote servers

setIntrospector(\Zend\XmlRpc\Client\ServerIntrospection $introspector) : \Zend\XmlRpc\Client\ServerIntrospection

Parameters

$introspector

Returns

\Zend\XmlRpc\Client\ServerIntrospection

Set skip system lookup flag

setSkipSystemLookup(boolean $flag = true) : \Zend\XmlRpc\Client

Parameters

$flag

boolean

Returns

\Zend\XmlRpc\Client

Skip system lookup when determining if parameter should be array or struct?

skipSystemLookup() : boolean

Returns

boolean

Create request object

_createRequest(string $method, array $params) : \Zend\XmlRpc\Request

Parameters

$method

string

$params

array

Returns

\Zend\XmlRpc\Request

 Properties

 

HTTP Client to use for requests

$httpClient : \Zend\Http\Client

Default

null
 

Introspection object

$introspector : \Zend\XmlRpc\Client\ServerIntrospection

Default

null
 

Request of the last method call

$lastRequest : \Zend\XmlRpc\Request

Default

null
 

Response received from the last method call

$lastResponse : \Zend\XmlRpc\Response

Default

null
 

Proxy object for more convenient method calls

$proxyCache : array

Default

array()
 

Full address of the XML-RPC service

$serverAddress : string

Default

example

Examples


 

Flag for skipping system lookup

$skipSystemLookup : boolean

Default

false