IXR_Request::__construct() WordPress Method
The IXR_Request::__construct() method is used to construct an XML-RPC request. It takes two parameters: the method name and an array of parameters.
IXR_Request::__construct( $method, $args ) #
PHP5 constructor.
Source
File: wp-includes/IXR/class-IXR-request.php
    function __construct($method, $args)
    {
        $this->method = $method;
        $this->args = $args;
        $this->xml = <<<EOD
<?xml version="1.0"?>
<methodCall>
<methodName>{$this->method}</methodName>
<params>
EOD;
        foreach ($this->args as $arg) {
            $this->xml .= '<param><value>';
            $v = new IXR_Value($arg);
            $this->xml .= $v->getXml();
            $this->xml .= "</value></param>\n";
        }
        $this->xml .= '</params></methodCall>';
    }
Expand full source codeCollapse full source codeView on TracView on GitHub