Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Client Class Reference

An XML-RPC client implementation. More...

Public Member Functions

 __construct ($server, Http\Client $httpClient=null)
 Create a new XML-RPC client to a remote server.
 
 setHttpClient (Http\Client $httpClient)
 Sets the HTTP client object to use for connecting the XML-RPC server.
 
 getHttpClient ()
 Gets the HTTP client object.
 
 setIntrospector (Client\ServerIntrospection $introspector)
 Sets the object used to introspect remote servers.
 
 getIntrospector ()
 Gets the introspection object.
 
 getLastRequest ()
 The request of the last method call.
 
 getLastResponse ()
 The response received from the last method call.
 
 getProxy ($namespace= '')
 Returns a proxy object for more convenient method calls.
 
 setSkipSystemLookup ($flag=true)
 Set skip system lookup flag.
 
 skipSystemLookup ()
 Skip system lookup when determining if parameter should be array or struct?
 
 doRequest ($request, $response=null)
 Perform an XML-RPC request and return a response.
 
 call ($method, $params=[])
 Send an XML-RPC request to the service (for a specific method)
 

Protected Member Functions

 createRequest ($method, $params)
 Create request object.
 

Protected Attributes

 $serverAddress
 
 $httpClient = null
 
 $introspector = null
 
 $lastRequest = null
 
 $lastResponse = null
 
 $proxyCache = []
 
 $skipSystemLookup = false
 

Detailed Description

An XML-RPC client implementation.

Constructor & Destructor Documentation

__construct (   $server,
Http\Client  $httpClient = null 
)

Create a new XML-RPC client to a remote server.

Parameters
string$serverFull address of the XML-RPC service (e.g. http://time.xmlrpc.com/RPC2)
\Zend\Http\Client$httpClientHTTP Client to use for requests

Member Function Documentation

call (   $method,
  $params = [] 
)

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

Parameters
string$methodName of the method we want to call
array$paramsArray of parameters for the method
Returns
mixed
Exceptions
\Zend\XmlRpc\Client\Exception\FaultException

Exception thrown when an XML-RPC fault is returned

Implements Client.

createRequest (   $method,
  $params 
)
protected

Create request object.

Parameters
string$method
array$params
Returns
doRequest (   $request,
  $response = null 
)

Perform an XML-RPC request and return a response.

Parameters
\Zend\XmlRpc\Request$request
null | \Zend\XmlRpc\Response$response
Returns
void
Exceptions
\Zend\XmlRpc\Client\Exception\HttpException

Exception thrown when an HTTP error occurs

getHttpClient ( )

Gets the HTTP client object.

Returns
getIntrospector ( )

Gets the introspection object.

Returns
getLastRequest ( )

The request of the last method call.

Returns
getLastResponse ( )

The response received from the last method call.

Returns
getProxy (   $namespace = '')

Returns a proxy object for more convenient method calls.

Parameters
string$namespaceNamespace to proxy or empty string for none
Returns
setHttpClient ( Http\Client  $httpClient)

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

Parameters
\Zend\Http\Client$httpClient
Returns
setIntrospector ( Client\ServerIntrospection  $introspector)

Sets the object used to introspect remote servers.

Parameters
\Zend\XmlRpc\Client\ServerIntrospection
Returns
setSkipSystemLookup (   $flag = true)

Set skip system lookup flag.

Parameters
bool$flag
Returns
skipSystemLookup ( )

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

Returns
bool

Member Data Documentation

$httpClient = null
protected
$introspector = null
protected
$lastRequest = null
protected
$lastResponse = null
protected
$proxyCache = []
protected
$serverAddress
protected
$skipSystemLookup = false
protected