CoreFiles by mySites.guru
class-IXR-clientmulticall.php44 lines, 963 bytes, from wordpress-5.4.21.zip
Raw History Compare with 5.4.20
md5
af10903340b8ebc353a5050a5face990
sha1
f545a65e2f85461712733618eac36d01b78d4f06
sha256
b080160b409e53b606df7c639ba33c4179291cac1aaaddf6405d98642e99603c
<?php
/**
 * IXR_ClientMulticall
 *
 * @package IXR
 * @since 1.5.0
 */
class IXR_ClientMulticall extends IXR_Client
{
    var $calls = array();

	/**
	 * PHP5 constructor.
	 */
    function __construct( $server, $path = false, $port = 80 )
    {
        parent::IXR_Client($server, $path, $port);
        $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
    }

	/**
	 * PHP4 constructor.
	 */
	public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) {
		self::__construct( $server, $path, $port );
	}

    function addCall()
    {
        $args = func_get_args();
        $methodName = array_shift($args);
        $struct = array(
            'methodName' => $methodName,
            'params' => $args
        );
        $this->calls[] = $struct;
    }

    function query()
    {
        // Prepare multicall, then call the parent::query() method
        return parent::query('system.multicall', $this->calls);
    }
}

The same content is in 343 releases, WordPress 4.7-beta1 to 5.4.25. See them all, or every version of this file.