WordPress at a glance
class is not described

IXR_Request{} WP 1.5.0

No Hooks.

Return

Null. Nothing.

Usage

$IXR_Request = new IXR_Request();
// use class methods

Methods

  1. __construct($method, $args)
  2. getLength()
  3. getXml()
  4. IXR_Request( $method, $args )

Notes

  • Package: IXR

Changelog

Since 1.5.0 Introduced.

Code of IXR_Request{} WP 5.5.1

<?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;
    }
}