IXR_Request WordPress Class
The IXR_Request class is used to make XML-RPC requests to a remote server. It can be used to call methods on a remote server, as well as to get and set data on a remote server.
IXR_Request #
Source
File: wp-includes/IXR/class-IXR-request.php
class IXR_Request { var $method; var $args; var $xml; /** * PHP5 constructor. */ 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>'; } /** * PHP4 constructor. */ public function IXR_Request( $method, $args ) { self::__construct( $method, $args ); } function getLength() { return strlen($this->xml); } function getXml() { return $this->xml; } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Methods
- __construct— PHP5 constructor.
- getLength
- getXml
- IXR_Request— PHP4 constructor.
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |