1st commit for syncing own Jlog developments with master

This commit is contained in:
RobbBienert 2024-10-04 16:40:09 +02:00
parent 2ae67af572
commit 517c58344d
54 changed files with 1784 additions and 1062 deletions

View file

@ -12,7 +12,7 @@
class IXR_Value {
var $data;
var $type;
function IXR_Value ($data, $type = false) {
function __construct ($data, $type = false) {
$this->data = $data;
if (!$type) {
$type = $this->calculateType();
@ -132,7 +132,7 @@ class IXR_Message {
var $_currentTagContents;
// The XML parser
var $_parser;
function IXR_Message ($message) {
function __construct ($message) {
$this->message = $message;
}
function parse() {
@ -275,7 +275,7 @@ class IXR_Server {
var $callbacks = array();
var $message;
var $capabilities;
function IXR_Server($callbacks = false, $data = false) {
function __construct($callbacks = false, $data = false) {
$this->setCapabilities();
if ($callbacks) {
$this->callbacks = $callbacks;
@ -328,7 +328,7 @@ EOD;
}
$method = $this->callbacks[$methodname];
// Perform the callback and send the response
if (count($args) == 1) {
if ($args !== null && count($args) == 1) {
// If only one paramater just send that instead of the whole array
$args = $args[0];
}
@ -430,7 +430,7 @@ class IXR_Request {
var $method;
var $args;
var $xml;
function IXR_Request($method, $args) {
function __construct($method, $args) {
$this->method = $method;
$this->args = $args;
$this->xml = <<<EOD
@ -467,7 +467,7 @@ class IXR_Client {
var $debug = false;
// Storage place for an error message
var $error = false;
function IXR_Client($server, $path = false, $port = 80) {
function __construct($server, $path = false, $port = 80) {
if (!$path) {
// Assume we have been given a URL instead
$bits = parse_url($server);
@ -565,7 +565,7 @@ class IXR_Client {
class IXR_Error {
var $code;
var $message;
function IXR_Error($code, $message) {
function __construct($code, $message) {
$this->code = $code;
$this->message = $message;
}
@ -601,7 +601,7 @@ class IXR_Date {
var $hour;
var $minute;
var $second;
function IXR_Date($time) {
function __construct($time) {
// $time can be a PHP timestamp or an ISO one
if (is_numeric($time)) {
$this->parseTimestamp($time);
@ -639,7 +639,7 @@ class IXR_Date {
class IXR_Base64 {
var $data;
function IXR_Base64($data) {
function __construct($data) {
$this->data = $data;
}
function getXml() {
@ -651,7 +651,7 @@ class IXR_Base64 {
class IXR_IntrospectionServer extends IXR_Server {
var $signatures;
var $help;
function IXR_IntrospectionServer() {
function __construct() {
$this->setCallbacks();
$this->setCapabilities();
$this->capabilities['introspection'] = array(
@ -795,7 +795,7 @@ class IXR_IntrospectionServer extends IXR_Server {
class IXR_ClientMulticall extends IXR_Client {
var $calls = array();
function IXR_ClientMulticall($server, $path = false, $port = 80) {
function __construct($server, $path = false, $port = 80) {
parent::IXR_Client($server, $path, $port);
$this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)';
}
@ -814,4 +814,3 @@ class IXR_ClientMulticall extends IXR_Client {
}
}
?>