diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-05-08 20:57:58 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-05-08 20:57:58 +0200 |
commit | 044379d18fbfb7673e5a5992e9c5af7830e358a8 (patch) | |
tree | 5da131e8e2e635fc49b59e05570acfa7ba520e5d /system/libraries/Xmlrpcs.php | |
parent | 0f13a13bbf7bc54dc2ef4dda44bbe2f3890af8c6 (diff) |
added 'object' key to the XML-RPCS config allowing the passing of a class object for method calls that aren't part of the CI super object
Diffstat (limited to 'system/libraries/Xmlrpcs.php')
-rw-r--r-- | system/libraries/Xmlrpcs.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index 1b2ffca05..7a4bc825e 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -41,7 +41,9 @@ class CI_Xmlrpcs extends CI_Xmlrpc var $system_methods = array(); // XML RPC Server methods
var $controller_obj;
-
+ var $object = FALSE;
+
+
//-------------------------------------
// Constructor, more or less
//-------------------------------------
@@ -74,6 +76,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc {
$this->debug = $config['debug'];
}
+
+ if (isset($config['object']) && is_object($config['object']))
+ {
+ $this->object = $config['object'];
+ }
}
//-------------------------------------
@@ -320,11 +327,16 @@ class CI_Xmlrpcs extends CI_Xmlrpc }
else
{
- $CI =& get_instance();
- return $CI->$method_parts['1']($m);
- //$class = new $method_parts['0'];
- //return $class->$method_parts['1']($m);
- //return call_user_func(array(&$method_parts['0'],$method_parts['1']), $m);
+ if ($this->object === FALSE)
+ {
+ $CI =& get_instance();
+ return $CI->$method_parts['1']($m);
+ }
+ else
+ {
+ return $this->object->$method_parts['1']($m);
+ //return call_user_func(array(&$method_parts['0'],$method_parts['1']), $m);
+ }
}
}
else
|