[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Horde/ -> RPC.php (sommaire)

(pas de description)

Poids: 252 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Horde_RPC:: (9 méthodes):
  Horde_RPC()
  shutdown()
  authorize()
  getInput()
  getResponse()
  getResponseContentType()
  request()
  factory()
  singleton()


Classe: Horde_RPC  - X-Ref

The Horde_RPC:: class provides a set of server and client methods for
RPC communication.

TODO:
- Introspection documentation and method signatures.

EXAMPLE:
<code>
$response = Horde_RPC::request('xmlrpc',
'http://localhost:80/horde/rpc.php'
'contacts.search',
array(array('jan'), array('localsql'),
array('name', 'email')),
array('user' => Auth::getAuth(),
'pass' => Auth::getCredential('password')));
</code>

$Horde: framework/RPC/RPC.php,v 1.7.10.8 2006/01/01 21:28:33 jan Exp $

Copyright 2002-2006 Jan Schneider <jan@horde.org>

See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Horde_RPC()   X-Ref
RPC server constructor

return: object   An RPC server instance.

shutdown()   X-Ref
Cleans up the RPC server.


authorize()   X-Ref
Check authentication. Different backends may handle
authentication in different ways. The base class implementation
checks for HTTP Authentication against the Horde auth setup.

return: boolean  Returns true if authentication is successful.

getInput()   X-Ref
Get the request body input. Different RPC backends can override
this to return an open stream to php://stdin, for instance -
whatever is easiest to handle in the getResponse() method.

The base class implementation looks for $HTTP_RAW_POST_DATA and
returns that if it's available; otherwise, it returns the
contents of php://stdin.

return: mixed  The input - a string (default), a filehandle, etc.

getResponse($request)   X-Ref
Sends an RPC request to the server and returns the result.

param: string  The raw request string.
return: string  The XML encoded response from the server.

getResponseContentType()   X-Ref
Get the Content-Type of the response.

return: string  The MIME Content-Type of the RPC response.

request($driver, $url, $method, $params = null, $options = array()   X-Ref
Builds an RPC request and sends it to the RPC server.

This statically called method is actually the RPC client.

param: string $driver    The protocol driver to use. Currently 'soap'
param: string $url       The path to the RPC server on the called host.
param: string $method    The method to call.
param: array $params     A hash containing any necessary parameters for
param: $options          Associative array of parameters depending on
return: mixed            The returned result from the method or a PEAR

factory($driver, $params = null)   X-Ref
Attempts to return a concrete RPC server instance based on
$driver.

param: mixed $driver  The type of concrete RPC subclass to return. If
param: array $params  A hash containing any additional configuration or
return: Horde_RPC  The newly created concrete Horde_RPC server instance,

singleton($driver, $params = null)   X-Ref
Attempts to return a reference to a concrete RPC server
instance based on $driver. It will only create a new instance
if no RPC server instance with the same parameters currently
exists.

This should be used if multiple RPC servers (and thus, multiple RPC
server instances) are required.

This method must be invoked as: $var = &Horde_RPC::singleton()

param: string $driver  The type of concrete RPC subclass to return.
param: array $params   A hash containing any additional configuration or
return: Horde_RPC  The concrete Horde_RPC server reference, or a



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7