var $data;
var $type;
- function IXR_Value($data, $type = false)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct( $data, $type = false )
{
$this->data = $data;
if (!$type) {
}
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Value( $data, $type = false ) {
+ self::__construct( $data, $type );
+ }
+
function calculateType()
{
if ($this->data === true || $this->data === false) {
* Checks whether or not the supplied array is a struct or not
*
* @param array $array
- * @return boolean
+ * @return bool
*/
function isStruct($array)
{
// The XML parser
var $_parser;
- function IXR_Message($message)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct( $message )
{
$this->message =& $message;
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Message( $message ) {
+ self::__construct( $message );
+ }
+
function parse()
{
// first remove the XML declaration
var $message;
var $capabilities;
- function IXR_Server($callbacks = false, $data = false, $wait = false)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct( $callbacks = false, $data = false, $wait = false )
{
$this->setCapabilities();
if ($callbacks) {
}
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Server( $callbacks = false, $data = false, $wait = false ) {
+ self::__construct( $callbacks, $data, $wait );
+ }
+
function serve($data = false)
{
if (!$data) {
var $args;
var $xml;
- function IXR_Request($method, $args)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct($method, $args)
{
$this->method = $method;
$this->args = $args;
$this->xml .= '</params></methodCall>';
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Request( $method, $args ) {
+ self::__construct( $method, $args );
+ }
+
function getLength()
{
return strlen($this->xml);
// Storage place for an error message
var $error = false;
- function IXR_Client($server, $path = false, $port = 80, $timeout = 15)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct( $server, $path = false, $port = 80, $timeout = 15 )
{
if (!$path) {
// Assume we have been given a URL instead
$this->timeout = $timeout;
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Client( $server, $path = false, $port = 80, $timeout = 15 ) {
+ self::__construct( $server, $path, $port, $timeout );
+ }
+
function query()
{
$args = func_get_args();
var $code;
var $message;
- function IXR_Error($code, $message)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct( $code, $message )
{
$this->code = $code;
$this->message = htmlspecialchars($message);
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Error( $code, $message ) {
+ self::__construct( $code, $message );
+ }
+
function getXml()
{
$xml = <<<EOD
var $second;
var $timezone;
- function IXR_Date($time)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct( $time )
{
// $time can be a PHP timestamp or an ISO one
if (is_numeric($time)) {
}
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Date( $time ) {
+ self::__construct( $time );
+ }
+
function parseTimestamp($timestamp)
{
$this->year = date('Y', $timestamp);
{
var $data;
- function IXR_Base64($data)
+ /**
+ * PHP5 constructor.
+ */
+ function __construct( $data )
{
$this->data = $data;
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_Base64( $data ) {
+ self::__construct( $data );
+ }
+
function getXml()
{
return '<base64>'.base64_encode($this->data).'</base64>';
var $signatures;
var $help;
- function IXR_IntrospectionServer()
+ /**
+ * PHP5 constructor.
+ */
+ function __construct()
{
$this->setCallbacks();
$this->setCapabilities();
);
}
+ /**
+ * PHP4 constructor.
+ */
+ public function IXR_IntrospectionServer() {
+ self::__construct();
+ }
+
function addCallback($method, $callback, $args, $help)
{
$this->callbacks[$method] = $callback;
{
var $calls = array();
- function IXR_ClientMulticall($server, $path = false, $port = 80)
+ /**
+ * 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();