Re-add Horde_Registry_Caller
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 9 Jul 2009 15:18:49 +0000 (11:18 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 9 Jul 2009 15:18:49 +0000 (11:18 -0400)
Not sure if this belongs here or maybe in it's own file, but this
at least makes Horde useable again.

framework/Core/lib/Horde/Horde/Registry.php

index d3d4779..7c85c0b 100644 (file)
@@ -1135,3 +1135,37 @@ class Horde_Registry
     }
 
 }
+
+/**
+ * @package Core
+ */
+class Horde_Registry_Caller
+{
+    /**
+     * TODO
+     */
+    protected $registry;
+
+    /**
+     * TODO
+     */
+    protected $api;
+
+    /**
+     * TODO
+     */
+    public function __construct($registry, $api)
+    {
+        $this->registry = $registry;
+        $this->api = $api;
+    }
+
+    /**
+     * TODO
+     */
+    public function __call($method, $args)
+    {
+        return $this->registry->call($this->api . '/' . $method, $args);
+    }
+
+}