[Sungrazr-svn] [100] Sungrazr_Server_Api: [FIX] Make sure only public handler methods are exposed via the API.

0 views
Skip to first unread message

cl...@killersoft.com

unread,
Dec 18, 2007, 8:12:07 PM12/18/07
to Sungra...@googlegroups.com
Revision
100
Author
clay
Date
2007-12-18 17:12:07 -0800 (Tue, 18 Dec 2007)

Log Message

Sungrazr_Server_Api: [FIX] Make sure only public handler methods are exposed via the API.

Modified Paths

Diff

Modified: trunk/Sungrazr/Server/Api.php (99 => 100)


--- trunk/Sungrazr/Server/Api.php	2007-12-18 23:15:30 UTC (rev 99)
+++ trunk/Sungrazr/Server/Api.php	2007-12-19 01:12:07 UTC (rev 100)
@@ -177,10 +177,12 @@
         // populate server api
         $this->api[$class]['server_api'] = array();
         foreach ($this->api[$class]['methods'] as $method => $info) {
-            $server_method = $ns . $method;
-            // keep track of where method originated
-            $info['callback'] = array($class, $method);
-            $this->api[$class]['server_api'][$server_method] = $info;
+            if ($info['access'] == 'public') {
+                $server_method = $ns . $method;
+                // keep track of where method originated
+                $info['callback'] = array($class, $method);
+                $this->api[$class]['server_api'][$server_method] = $info;
+            }
         }        
         
         // cache result
Reply all
Reply to author
Forward
0 new messages