IXR_ClientMulticall

IXR_ClientMulticall.

Defined (1)

The class is defined in the following location(s).

/wp-includes/class-IXR.php  
  1. class IXR_ClientMulticall extends IXR_Client 
  2. var $calls = array(); 
  3.  
  4. /** 
  5. * PHP5 constructor. 
  6. */ 
  7. function __construct( $server, $path = false, $port = 80 ) 
  8. parent::IXR_Client($server, $path, $port); 
  9. $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)'; 
  10.  
  11. /** 
  12. * PHP4 constructor. 
  13. */ 
  14. public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) { 
  15. self::__construct( $server, $path, $port ); 
  16.  
  17. function addCall() 
  18. $args = func_get_args(); 
  19. $methodName = array_shift($args); 
  20. $struct = array( 
  21. 'methodName' => $methodName,  
  22. 'params' => $args 
  23. ); 
  24. $this->calls[] = $struct; 
  25.  
  26. function query() 
  27. // Prepare multicall, then call the parent::query() method 
  28. return parent::query('system.multicall', $this->calls);