PHP Класс Habari\XMLRPCClient

To Use: Create the object using the XMLRPC entrypoint and scope. $rpc= new XMLRPCClient( 'http://rpc.pingomatic.com', 'weblogUpdates' ); Make a weblogUpdates.ping call on the client. $result= $rpc->ping( 'Blog name', 'http://example.com' ); Change the scope on the existing client object. $rpc->set_scope( 'system' ); Make a system.listMethods call on the client. $methods= $rpc->listMethods();
Показать файл Открыть проект

Открытые методы

Метод Описание
__call ( string $fname, array $args ) : array Allow method overloading for this class.
__construct ( string $xmlrpc_entrypoint, $scope = null ) Create the XMLRPCClient
__get ( string $scope ) : XMLRPCClient Allow scoped functions to be called in shorthand Example: Create the XMLRPC object $rpc= new XMLRPCClient( 'http://rpc.pingomatic.com' ); Call weblogUpdates.ping RPC call $rpc->weblogUpdates->ping( 'Blog name', 'http://example.com' );
open ( string $xmlrpc_entrypoint ) : XMLRPCClient Convenience method to create a new XMLRPCClient object Example: XMLRPCClient::open( 'http://rpc.pingomatic.com' )->weblogUpdates->ping( 'Blog name', 'http://example.com' );
set_scope ( string $scope ) Set the scope of any subsequent function calls The default scope is 'system'.

Описание методов

__call() публичный Метод

This method allows any method name to be called on this object. The method called is the method called via RPC, within the scope defined in $this->scope.
public __call ( string $fname, array $args ) : array
$fname string The function name to call
$args array An array of arguments that were called with the function
Результат array The result array

__construct() публичный Метод

Create the XMLRPCClient
public __construct ( string $xmlrpc_entrypoint, $scope = null )
$xmlrpc_entrypoint string The entrypoint of the remote server

__get() публичный Метод

Allow scoped functions to be called in shorthand Example: Create the XMLRPC object $rpc= new XMLRPCClient( 'http://rpc.pingomatic.com' ); Call weblogUpdates.ping RPC call $rpc->weblogUpdates->ping( 'Blog name', 'http://example.com' );
public __get ( string $scope ) : XMLRPCClient
$scope string The scope to set this object to.
Результат XMLRPCClient This object instance

open() публичный статический Метод

Convenience method to create a new XMLRPCClient object Example: XMLRPCClient::open( 'http://rpc.pingomatic.com' )->weblogUpdates->ping( 'Blog name', 'http://example.com' );
public static open ( string $xmlrpc_entrypoint ) : XMLRPCClient
$xmlrpc_entrypoint string The entrypoint of the remote server
Результат XMLRPCClient The created client object

set_scope() публичный Метод

Set the scope of any subsequent function calls The default scope is 'system'.
public set_scope ( string $scope )
$scope string The scope to use