wp/wp-includes/IXR/class-IXR-clientmulticall.php
changeset 16 a86126ab1dd4
parent 7 cf61fcea0001
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    23 	 */
    23 	 */
    24 	public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) {
    24 	public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) {
    25 		self::__construct( $server, $path, $port );
    25 		self::__construct( $server, $path, $port );
    26 	}
    26 	}
    27 
    27 
    28     function addCall()
    28 	/**
       
    29 	 * @since 1.5.0
       
    30 	 * @since 5.5.0 Formalized the existing `...$args` parameter by adding it
       
    31 	 *              to the function signature.
       
    32 	 */
       
    33     function addCall( ...$args )
    29     {
    34     {
    30         $args = func_get_args();
       
    31         $methodName = array_shift($args);
    35         $methodName = array_shift($args);
    32         $struct = array(
    36         $struct = array(
    33             'methodName' => $methodName,
    37             'methodName' => $methodName,
    34             'params' => $args
    38             'params' => $args
    35         );
    39         );
    36         $this->calls[] = $struct;
    40         $this->calls[] = $struct;
    37     }
    41     }
    38 
    42 
    39     function query()
    43 	/**
       
    44 	 * @since 1.5.0
       
    45 	 * @since 5.5.0 Formalized the existing `...$args` parameter by adding it
       
    46 	 *              to the function signature.
       
    47 	 *
       
    48 	 * @return bool
       
    49 	 */
       
    50     function query( ...$args )
    40     {
    51     {
    41         // Prepare multicall, then call the parent::query() method
    52         // Prepare multicall, then call the parent::query() method
    42         return parent::query('system.multicall', $this->calls);
    53         return parent::query('system.multicall', $this->calls);
    43     }
    54     }
    44 }
    55 }