Overview

Namespaces

  • Jyxo
    • Beholder
      • TestCase
    • Gettext
      • Parser
    • Input
      • Chain
      • Filter
      • Validator
    • Mail
      • Email
        • Attachment
      • Parser
      • Sender
    • Rpc
      • Json
      • Xml
    • Shell
    • Spl
    • Svn
    • Time
    • Webdav
  • PHP

Classes

  • Client
  • Server

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated

Class Client

Abstract class for sending RPC requests.

Direct known subclasses

Jyxo\Rpc\Json\Client, Jyxo\Rpc\Xml\Client
Abstract
Namespace: Jyxo\Rpc
Category: Jyxo
Package: Jyxo\Rpc
Copyright: Copyright (c) 2005-2011 Jyxo, s.r.o.
License: https://github.com/jyxo/php/blob/master/license.txt
Author: Jaroslav HanslĂ­k
Located at Rpc/Client.php
Methods summary
public
# __construct( string $url = '' )

Creates client instance and eventually sets server address.

Creates client instance and eventually sets server address.

Parameters

$url
string
Server address
public Jyxo\Rpc\Client
# setUrl( string $url )

Sets server address.

Sets server address.

Parameters

$url
string
Server address

Returns

Jyxo\Rpc\Client
public Jyxo\Rpc\Client
# setTimeout( integer $timeout )

Sets timeout.

Sets timeout.

Parameters

$timeout
integer
Call timeout

Returns

Jyxo\Rpc\Client
public Jyxo\Rpc\Client
# setOption( string $key, mixed $value )

Changes client settings.

Changes client settings.

Parameters

$key
string
Parameter name
$value
mixed
Parameter value

Returns

Jyxo\Rpc\Client
public mixed
# getOption( string $key = '' )

Returns certain parameter or whole array of parameters if no parameter name is provided.

Returns certain parameter or whole array of parameters if no parameter name is provided.

Parameters

$key
string
Parameter name

Returns

mixed
public Jyxo\Rpc\Client
# enableProfiler( )

Turns request profiler on.

Turns request profiler on.

Returns

Jyxo\Rpc\Client
public Jyxo\Rpc\Client
# disableProfiler( )

Turns request profiler off.

Turns request profiler off.

Returns

Jyxo\Rpc\Client
abstract public mixed
# send( string $method, array $params )

Sends a request and fetches a response from the server.

Sends a request and fetches a response from the server.

Parameters

$method
string
Method name
$params
array
Method parameters

Returns

mixed

Throws

BadMethodCallException
If no server address was provided
Jyxo\Rpc\Exception
On error
protected string
# process( string $contentType, string $data )

Processes request data and fetches response.

Processes request data and fetches response.

Parameters

$contentType
string
Request content-type
$data
string
Request data

Returns

string

Throws

BadMethodCallException
If no server address was provided
Jyxo\Rpc\Exception
On error
protected Jyxo\Rpc\Client
# profileStart( )

Starts profiling.

Starts profiling.

Returns

Jyxo\Rpc\Client
protected Jyxo\Rpc\Client
# profileEnd( string $type, string $method, array $params, mixed $response )

Finishes profiling.

Finishes profiling.

Parameters

$type
string
Request type
$method
string
Method name
$params
array
Method parameters
$response
mixed
Server response

Returns

Jyxo\Rpc\Client
Properties summary
protected string $url ''
#

Server address.

Server address.

protected integer $timeout 5
#

Time limit for communication with RPC server (seconds).

Time limit for communication with RPC server (seconds).

protected array $options array()
#

Parameters for creating RPC requests.

Parameters for creating RPC requests.

Jyxo PHP Library API documentation generated by ApiGen 2.3.0