From: gggeek Date: Sat, 2 Jan 2021 15:17:40 +0000 (+0000) Subject: reinstate access to xmlrpc_server->dmap (for users of the v3 API) X-Git-Tag: 4.5.1~6 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=410c018e5398fd52cf67dba20cb22f25c4e36517;p=plcapi.git reinstate access to xmlrpc_server->dmap (for users of the v3 API) --- diff --git a/lib/xmlrpcs.inc b/lib/xmlrpcs.inc index df6b047f..33043f14 100644 --- a/lib/xmlrpcs.inc +++ b/lib/xmlrpcs.inc @@ -57,6 +57,32 @@ class xmlrpc_server extends Server $r = new PhpXmlRpc\Response(new PhpXmlRpc\Value("'Aha said I: '" . file_get_contents('php://input'), 'string')); print $r->serialize(); } + + /** + * Reinstate access to class members which became protected/private + * @param string $name + * @return mixed + */ + public function __get($name) + { + switch($name) { + case 'dmap': + return $this->dmap; + default: + trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . + $trace[0]['line'], E_USER_NOTICE); + return null; + } + } + + /** + * @param string $name + * @return bool + */ + public function __isset($name) + { + return $name === 'dmap'; + } } /* Expose as global functions the ones which are now class methods */