Prado\Web\Services\TRpcProtocol::addMethod PHP Метод

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

Registers a new RPC method and handler details
public addMethod ( string $methodName, array $handlerDetails )
$methodName string
$handlerDetails array containing the callback handler
    public function addMethod($methodName, $handlerDetails)
    {
        $this->rpcMethods[$methodName] = $handlerDetails;
    }

Usage Example

Пример #1
0
 /**
  * Registers a new RPC method and handler details
  * @param string $methodName
  * @param array $handlerDetails containing the callback handler
  */
 public function addMethod($methodName, $methodDetails)
 {
     parent::addMethod($methodName, $methodDetails);
     xmlrpc_server_register_method($this->_xmlrpcServer, $methodName, array($this, 'callApiMethod'));
 }