Client
Less than 1 minute
Client
Abstract base class for RPC clients.
class Client extends \Hazaar\HTTP\ClientProvides core logic for making remote procedure calls (RPC) using a specified encoder and endpoint URL. Subclasses must implement the getEncoder() method to provide the appropriate encoder for the protocol.
Properties
location
The endpoint URL for the RPC server.
protected URL $locationmethodPfx
Optional prefix to prepend to method names for RPC calls.
protected string $methodPfxMethods
__construct
Constructs a new RPC client instance.
public __construct(URL $url, string $methodPfx): voidParameters
| Parameter | Type | Description |
|---|---|---|
$url | URL | the endpoint URL for the RPC server |
$methodPfx | string | optional method prefix for RPC calls |
__call
public __call(string $name, array $args): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$args | array |
getEndpoint
Retrieves the endpoint URL for the XML-RPC client.
public getEndpoint(): stringgetEncoder
Returns the encoder instance used by the client.
public getEncoder(): EncoderThis method must be implemented by subclasses of Client to provide the appropriate Encoder instance for encoding RPC requests.
call
public call(string $name, array $args): mixedParameters
| Parameter | Type | Description |
|---|---|---|
$name | string | |
$args | array |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000