Clean up - standardize on camelCase method names etc...
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 28 Feb 2009 18:23:22 +0000 (13:23 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 28 Feb 2009 18:23:22 +0000 (13:23 -0500)
14 files changed:
framework/Service_Facebook/lib/Horde/Service/Facebook.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Auth.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Events.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Feeds.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Fql.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Friends.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Groups.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Links.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Notes.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Notifications.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Photos.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Users.php
framework/Service_Facebook/lib/Horde/Service/Facebook/Videos.php

index 13a68ad..cdfe8cb 100644 (file)
 class Horde_Service_Facebook
 {
     /**
-     * The application's API Key
+     * Use only ssl resource flag
      *
-     * @var stirng
+     * @var boolean
      */
-    public $api_key;
+    public $useSslResources = false;
 
     /**
-     * The API Secret Key
+     * The application's API Key
      *
-     * @var string
+     * @var stirng
      */
-    public $secret;
+    protected $_apiKey;
 
     /**
-     * Use only ssl resource flag
+     * The API Secret Key
      *
-     * @var boolean
+     * @var string
      */
-    public $useSslResources = false;
+    protected $_secret;
 
     /**
      * Holds the batch object when building a batch request.
      *
      * @var Horde_Service_Facebook_Batch
      */
-    public $batchRequest;
+    protected $_batchRequest;
 
     /**
      * Holds an optional logger object
@@ -175,7 +175,7 @@ class Horde_Service_Facebook
 
         $this->_logDebug('Initializing Horde_Service_Facebook');
 
-        $this->api_key = $api_key;
+        $this->_apiKey = $api_key;
         $this->secret = $secret;
 
         if (!empty($context['use_ssl'])) {
@@ -209,6 +209,10 @@ class Horde_Service_Facebook
         switch ($value) {
         case 'internalFormat':
             return $this->_internalFormat;
+        case 'apiKey':
+            return $this->_apiKey;
+        case 'secret':
+            return $this->_secret;
         }
 
         // If not, assume it's a method/action class...
@@ -226,21 +230,11 @@ class Horde_Service_Facebook
     }
 
     /**
-     * Return the current request's url
-     *
-     * @return string
-     */
-    protected function _current_url()
-    {
-        return sprintf("%s/%s", $this->_request->getHost(), $this->_request->getUri());
-    }
-
-    /**
      * Helper function to get the appropriate facebook url
      *
      * @return string
      */
-    public static function get_facebook_url($subdomain = 'www')
+    public static function getFacebookUrl($subdomain = 'www')
     {
         return 'http://' . $subdomain . '.facebook.com';
     }
@@ -252,8 +246,8 @@ class Horde_Service_Facebook
      */
     public function get_login_url($next)
     {
-        return self::get_facebook_url() . '/login.php?v=1.0&api_key='
-            . $this->api_key . ($next ? '&next=' . urlencode($next)  : '');
+        return self::getFacebookUrl() . '/login.php?v=1.0&api_key='
+            . $this->_apiKey . ($next ? '&next=' . urlencode($next)  : '');
     }
 
     /**
@@ -261,13 +255,13 @@ class Horde_Service_Facebook
      */
     public function batchBegin()
     {
-        if ($this->batchRequest !== null) {
+        if ($this->_batchRequest !== null) {
             $code = Horde_Service_Facebook_ErrorCodes::API_EC_BATCH_ALREADY_STARTED;
             $description = Horde_Service_Facebook_ErrorCodes::$api_error_descriptions[$code];
             throw new Horde_Service_Facebook_Exception($description, $code);
         }
 
-        $this->batchRequest = new Horde_Service_Facebook_BatchRequest($this, $this->_http);
+        $this->_batchRequest = new Horde_Service_Facebook_BatchRequest($this, $this->_http);
     }
 
     /**
@@ -275,14 +269,14 @@ class Horde_Service_Facebook
      */
     public function batchEnd()
     {
-        if ($this->batchRequest === null) {
+        if ($this->_batchRequest === null) {
             $code = Horde_Service_Facebook_ErrorCodes::API_EC_BATCH_NOT_STARTED;
             $description = Horde_Service_Facebook_ErrorCodes::$api_error_descriptions[$code];
             throw new Horde_Service_Facebook_Exception($description, $code);
         }
 
-        $this->batchRequest->run();
-        $this->batchRequest = null;
+        $this->_batchRequest->run();
+        $this->_batchRequest = null;
     }
 
     /**
@@ -312,13 +306,13 @@ class Horde_Service_Facebook
      *                'delayed returns' when in a batch context.
      *     See: http://wiki.developers.facebook.com/index.php/Using_batching_API
      */
-    public function &call_method($method, $params = array())
+    public function &callMethod($method, $params = array())
     {
-        if ($this->batchRequest === null) {
+        if ($this->_batchRequest === null) {
             $request = new Horde_Service_Facebook_Request($this, $method, $this->_http, $params);
             $results = &$request->run();
         } else {
-            $results = &$this->batchRequest->add($method, $params);
+            $results = &$this->_batchRequest->add($method, $params);
         }
 
         return $results;
index b7687d1..82b0a4e 100644 (file)
@@ -77,8 +77,8 @@ class Horde_Service_Facebook_Auth
      */
     public function getAuthTokenUrl()
     {
-        return $this->_facebook->get_facebook_url() . '/code_gen.php?v=1.0&api_key='
-            . $this->_facebook->api_key;
+        return $this->_facebook->getFacebookUrl() . '/code_gen.php?v=1.0&api_key='
+            . $this->_facebook->apiKey;
     }
 
 
@@ -93,8 +93,8 @@ class Horde_Service_Facebook_Auth
      */
     public function getExtendedPermUrl($perm, $success_url = '', $cancel_url = '')
     {
-        return $this->_facebook->get_facebook_url() . '/authorize.php?v=1'
-            . '&ext_perm=' . $perm . '&api_key=' . $this->_facebook->api_key
+        return $this->_facebook->getFacebookUrl() . '/authorize.php?v=1'
+            . '&ext_perm=' . $perm . '&api_key=' . $this->_facebook->apiKey
             . (!empty($success_url) ? '&next=' . urlencode($success_url) : '')
             . (!empty($cancel_url) ? '&cancel=' . urlencode($cancel_url) : '');
     }
@@ -128,19 +128,16 @@ class Horde_Service_Facebook_Auth
      */
     public function getSession($auth_token)
     {
-        //Check if we are in batch mode
-        if ($this->_facebook->batchRequest === null) {
-            try {
-                $results = $this->_facebook->call_method(
-                    'facebook.auth.getSession',
-                    array('auth_token' => $auth_token));
-                return $results;
-            } catch (Horde_Service_Facebook_Exception $e) {
-                if ($e->getCode() != Horde_Service_Facebook_ErrorCodes::API_EC_PARAM) {
-                    // API_EC_PARAM means we don't have a logged in user, otherwise who
-                    // knows what it means, so just throw it.
-                    throw $e;
-                }
+        try {
+            $results = $this->_facebook->callMethod(
+                'facebook.auth.getSession',
+                array('auth_token' => $auth_token));
+            return $results;
+        } catch (Horde_Service_Facebook_Exception $e) {
+            if ($e->getCode() != Horde_Service_Facebook_ErrorCodes::API_EC_PARAM) {
+                // API_EC_PARAM means we don't have a logged in user, otherwise who
+                // knows what it means, so just throw it.
+                throw $e;
             }
         }
     }
@@ -154,7 +151,7 @@ class Horde_Service_Facebook_Auth
      */
     public function createToken()
     {
-        return $this->_facebook->call_method('facebook.auth.createToken');
+        return $this->_facebook->callMethod('facebook.auth.createToken');
     }
 
     /**
@@ -172,7 +169,7 @@ class Horde_Service_Facebook_Auth
             'No Session', Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
 
-        return $this->_facebook->call_method('facebook.auth.expireSession', array('session_key' => $this->_sessionKey));
+        return $this->_facebook->callMethod('facebook.auth.expireSession', array('session_key' => $this->_sessionKey));
     }
 
     /**
@@ -182,12 +179,12 @@ class Horde_Service_Facebook_Auth
     public function expireSession()
     {
         if ($this->_expireSession()) {
-            if ($this->_request->getCookie($this->_facebook->api_key . '_user')) {
+            if ($this->_request->getCookie($this->_facebook->apiKey . '_user')) {
                 $cookies = array('user', 'session_key', 'expires', 'ss');
                 foreach ($cookies as $name) {
-                    setcookie($this->_facebook->api_key . '_' . $name, false, time() - 3600);
+                    setcookie($this->_facebook->apiKey . '_' . $name, false, time() - 3600);
                 }
-                setcookie($this->_facebook->api_key, false, time() - 3600);
+                setcookie($this->_facebook->apiKey, false, time() - 3600);
             }
 
             // now, clear the rest of the stored state
@@ -248,12 +245,12 @@ class Horde_Service_Facebook_Auth
             $this->setUser($user, $sessionKey, $expires);
 
         } elseif (!$ignore_cookies &&
-                  $fb_params = $this->_getParams($this->_request->getCookie(), null, $this->_facebook->api_key)) {
+                  $fb_params = $this->_getParams($this->_request->getCookie(), null, $this->_facebook->apiKey)) {
 
             // Nothing yet, try cookies...this is where we will get our values
             // for an extenral web app accessing FB's API - assuming the session
             // has already been retrieved previously.
-            $base_domain_cookie = 'base_domain_' . $this->_facebook->api_key;
+            $base_domain_cookie = 'base_domain_' . $this->_facebook->apiKey;
             if ($this->_request->getCookie($base_domain_cookie)) {
                 $this->_base_domain = $this->_request->getCookie($base_domain_cookie);
             }
@@ -392,12 +389,12 @@ class Horde_Service_Facebook_Auth
             $cookies['expires'] = $expires;
         }
         foreach ($cookies as $name => $val) {
-            setcookie($this->_facebook->api_key . '_' . $name, $val, (int)$expires, '', $this->_base_domain);
+            setcookie($this->_facebook->apiKey . '_' . $name, $val, (int)$expires, '', $this->_base_domain);
         }
         $sig = self::generateSignature($cookies, $this->_facebook->secret);
-        setcookie($this->_facebook->api_key, $sig, (int)$expires, '', $this->_base_domain);
+        setcookie($this->_facebook->apiKey, $sig, (int)$expires, '', $this->_base_domain);
         if ($this->_base_domain != null) {
-            $base_domain_cookie = 'base_domain_' . $this->_facebook->api_key;
+            $base_domain_cookie = 'base_domain_' . $this->_facebook->apiKey;
             setcookie($base_domain_cookie, $this->_base_domain, (int)$expires, '', $this->_base_domain);
         }
     }
@@ -413,8 +410,8 @@ class Horde_Service_Facebook_Auth
      */
     public function setUser($user, $sessionKey, $expires = null, $no_cookie = false)
     {
-        if ($no_cookie || !$this->_request->getCookie($this->_facebook->api_key . '_user') ||
-            $this->_request->getCookie($this->_facebook->api_key . '_user') != $user) {
+        if ($no_cookie || !$this->_request->getCookie($this->_facebook->apiKey . '_user') ||
+            $this->_request->getCookie($this->_facebook->apiKey . '_user') != $user) {
 
             $this->setCookies($user, $sessionKey, $expires);
         }
index 691fe04..45c57e6 100644 (file)
@@ -36,8 +36,8 @@
                                 $end_time = null, $rsvp_status = null)
     {
         // Note we return a reference to support batched calls
-        //  (see Horde_Service_Facebook::call_method)
-        return $this->_facebook->call_method('facebook.events.get',
+        //  (see Horde_Service_Facebook::callMethod)
+        return $this->_facebook->callMethod('facebook.events.get',
             array('uid' => $uid,
                   'eids' => $eids,
                   'start_time' => $start_time,
@@ -56,7 +56,7 @@
      */
     public function &getMembers($eid)
     {
-        return $this->_facebook->call_method('facebook.events.getMembers',
+        return $this->_facebook->callMethod('facebook.events.getMembers',
                                              array('eid' => $eid,
                                                    'session_key' => $this->_facebook->auth->getSessionKey()));
     }
@@ -71,7 +71,7 @@
      */
     public function &rsvp($eid, $rsvp_status)
     {
-        return $this->_facebook->call_method('facebook.events.rsvp',
+        return $this->_facebook->callMethod('facebook.events.rsvp',
             array('eid' => $eid,
                   'rsvp_status' => $rsvp_status,
                    'session_key' => $this->_facebook->auth->getSessionKey()));
@@ -89,7 +89,7 @@
      */
     public function &cancel($eid, $cancel_message = '')
     {
-        return $this->_facebook->call_method('facebook.events.cancel',
+        return $this->_facebook->callMethod('facebook.events.cancel',
             array('eid' => $eid,
                   'cancel_message' => $cancel_message,
                   'session_key' => $this->_facebook->auth->getSessionKey()));
      */
     public function &create($event_info)
     {
-        return $this->_facebook->call_method('facebook.events.create',
+        return $this->_facebook->callMethod('facebook.events.create',
             array('event_info' => $event_info,
                   'session_key' => $this->_facebook->auth->getSessionKey()));
     }
      */
     public function &edit($eid, $event_info)
     {
-        return $this->_facebook->call_method('facebook.events.edit',
+        return $this->_facebook->callMethod('facebook.events.edit',
             array('eid' => $eid,
                   'event_info' => $event_info,
                   'session_key' => $this->_facebook->auth->getSessionKey()));
index 7971f81..170141e 100644 (file)
@@ -36,7 +36,7 @@ class Horde_Service_Facebook_Feeds extends Horde_Service_Facebook_Base
             $actionLinks = json_encode($actionLinks);
         }
 
-        return $this->_facebook->call_method('facebook.feed.registerTemplateBundle',
+        return $this->_facebook->callMethod('facebook.feed.registerTemplateBundle',
             array('one_line_story_templates' => $oneLineStory,
                   'short_story_templates' => $shortStory,
                   'full_story_template' => $fullStory,
@@ -51,7 +51,7 @@ class Horde_Service_Facebook_Feeds extends Horde_Service_Facebook_Base
      */
     public function &getRegisteredTemplateBundles()
     {
-        return $this->_facebook->call_method('facebook.feed.getRegisteredTemplateBundles');
+        return $this->_facebook->callMethod('facebook.feed.getRegisteredTemplateBundles');
     }
 
     /**
@@ -64,7 +64,7 @@ class Horde_Service_Facebook_Feeds extends Horde_Service_Facebook_Base
      */
     public function &getRegisteredTemplateBundleByID($id)
     {
-        return $this->_facebook->call_method('facebook.feed.getRegisteredTemplateBundleByID',
+        return $this->_facebook->callMethod('facebook.feed.getRegisteredTemplateBundleByID',
             array('template_bundle_id' => $id));
     }
 
@@ -77,7 +77,7 @@ class Horde_Service_Facebook_Feeds extends Horde_Service_Facebook_Base
      */
     public function &deactivateTemplateBundleByID($id)
     {
-        return $this->_facebook->call_method('facebook.feed.deactivateTemplateBundleByID',
+        return $this->_facebook->callMethod('facebook.feed.deactivateTemplateBundleByID',
             array('template_bundle_id' => $id));
     }
 
@@ -119,7 +119,7 @@ class Horde_Service_Facebook_Feeds extends Horde_Service_Facebook_Base
             $targetIds = trim($targetIds, "[]");
         }
 
-        return $this->_facebook->call_method('facebook.feed.publishUserAction',
+        return $this->_facebook->callMethod('facebook.feed.publishUserAction',
             array('template_bundle_id' => $bundleId,
                   'template_data' => $data,
                   'target_ids' => $targetIds,
@@ -137,7 +137,7 @@ class Horde_Service_Facebook_Feeds extends Horde_Service_Facebook_Base
      */
     public function &getAppFriendStories()
     {
-        return $this->_facebook->call_method('facebook.feed.getAppFriendStories');
+        return $this->_facebook->callMethod('facebook.feed.getAppFriendStories');
     }
 
 }
\ No newline at end of file
index 55aaf0f..8b676ae 100644 (file)
@@ -28,7 +28,7 @@ class Horde_Service_Facebook_Fql extends Horde_Service_Facebook_Base
             $params['session_key'] = $this->_facebook->auth->getSessionKey();
         }
 
-        return $this->_facebook->call_method('facebook.fql.query', $params);
+        return $this->_facebook->callMethod('facebook.fql.query', $params);
     }
 
 }
\ No newline at end of file
index 6bb3c2a..65e4e6a 100644 (file)
@@ -34,7 +34,7 @@ class Horde_Service_Facebook_Friends extends Horde_Service_Facebook_Base
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
 
-        return $this->_facebook->call_method('facebook.friends.areFriends',
+        return $this->_facebook->callMethod('facebook.friends.areFriends',
             array('uids1' => $uids1,
                   'uids2' => $uids2,
                   'session_key' => $skey));
@@ -63,7 +63,7 @@ class Horde_Service_Facebook_Friends extends Horde_Service_Facebook_Base
           $params['flid'] = $flid;
         }
 
-        return $this->_facebook->call_method('facebook.friends.get', $params);
+        return $this->_facebook->callMethod('facebook.friends.get', $params);
     }
 
     /**
@@ -78,7 +78,7 @@ class Horde_Service_Facebook_Friends extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('facebook.friends.getLists',
+        return $this->_facebook->callMethod('facebook.friends.getLists',
              array('session_key' => $this->_facebook->auth->getSessionKey()));
     }
 
index 6d1ea0c..0b549cd 100644 (file)
@@ -27,7 +27,7 @@ class Horde_Service_Facebook_Groups extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('facebook.groups.get',
+        return $this->_facebook->callMethod('facebook.groups.get',
             array('uid' => $uid, 'gids' => $gids, 'session_key' => $skey));
     }
 
@@ -46,7 +46,7 @@ class Horde_Service_Facebook_Groups extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('facebook.groups.getMembers',
+        return $this->_facebook->callMethod('facebook.groups.getMembers',
              array('gid' => $gid, 'session_key' => $skey));
     }
 
index e99bd49..eb37f05 100644 (file)
@@ -27,7 +27,7 @@ class Horde_Service_Facebook_Links extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('links.get',
+        return $this->_facebook->callMethod('links.get',
             array('uid' => $uid,
                   'limit' => $limit,
                   'link_ids' => json_encode($link_ids),
@@ -51,7 +51,7 @@ class Horde_Service_Facebook_Links extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('links.post',
+        return $this->_facebook->callMethod('links.post',
             array('uid' => $uid,
                   'url' => $url,
                   'comment' => $comment,
index 84508f4..05d5757 100644 (file)
@@ -29,7 +29,7 @@ class Horde_Service_Facebook_Notes extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('notes.create',
+        return $this->_facebook->callMethod('notes.create',
             array('uid' => $uid,
                   'title' => $title,
                   'content' => $content,
@@ -52,7 +52,7 @@ class Horde_Service_Facebook_Notes extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('notes.delete',
+        return $this->_facebook->callMethod('notes.delete',
             array('uid' => $uid,
                   'note_id' => $note_id,
                   'session_key' => $skey));
@@ -76,7 +76,7 @@ class Horde_Service_Facebook_Notes extends Horde_Service_Facebook_Base
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
 
-        return $this->_facebook->call_method('notes.edit',
+        return $this->_facebook->callMethod('notes.edit',
             array('note_id' => $note_id,
                   'title' => $title,
                   'content' => $content,
@@ -103,7 +103,7 @@ class Horde_Service_Facebook_Notes extends Horde_Service_Facebook_Base
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
 
-        return $this->_facebook->call_method('notes.get',
+        return $this->_facebook->callMethod('notes.get',
             array('session_key' => $skey,
                   'uid' => $uid,
                   'note_ids' => json_encode($note_ids)));
index 697582c..e0e8671 100644 (file)
@@ -26,7 +26,7 @@ class Horde_Service_Facebook_Notifications extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->_facebook->call_method('facebook.notifications.get',
+        return $this->_facebook->callMethod('facebook.notifications.get',
             array('session_key' => $skey));
     }
 
@@ -45,7 +45,7 @@ class Horde_Service_Facebook_Notifications extends Horde_Service_Facebook_Base
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
 
-        return $this->call_method('facebook.notifications.send',
+        return $this->callMethod('facebook.notifications.send',
             array('to_ids' => $to_ids,
                   'notification' => $notification,
                   'type' => $type,
@@ -72,7 +72,7 @@ class Horde_Service_Facebook_Notifications extends Horde_Service_Facebook_Base
             throw new Horde_Service_Facebook_Exception('session_key is required',
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
-        return $this->call_method('facebook.notifications.sendEmail',
+        return $this->callMethod('facebook.notifications.sendEmail',
             array('recipients' => $recipients,
                   'subject' => $subject,
                   'text' => $text,
index e96abfe..212a5c0 100644 (file)
@@ -59,7 +59,7 @@ class Horde_Service_Facebook_Photos extends Horde_Service_Facebook_Base
         if ($this->_facebook->dataFormat == Horde_Service_Facebook::DATA_FORMAT_ARRAY) {
             $oldFormat = $this->_facebook->setInternalFormat(Horde_Service_Facebook::DATA_FORMAT_XML);
         }
-        $results = $this->_facebook->call_method('facebook.photos.addTag', $params);
+        $results = $this->_facebook->callMethod('facebook.photos.addTag', $params);
         if (!empty($oldFormat)) {
             $this->_facebook->setInternalFormat($oldFormat);
         }
@@ -112,7 +112,7 @@ class Horde_Service_Facebook_Photos extends Horde_Service_Facebook_Base
         if ($this->_facebook->dataFormat == Horde_Service_Facebook::DATA_FORMAT_ARRAY) {
             $oldFormat = $this->_facebook->setInternalFormat(Horde_Service_Facebook::DATA_FORMAT_XML);
         }
-        $results = $this->_facebook->call_method('facebook.photos.createAlbum', $params);
+        $results = $this->_facebook->callMethod('facebook.photos.createAlbum', $params);
         if (!empty($oldFormat)) {
             $this->_facebook->setInternalFormat($oldFormat);
         }
@@ -160,7 +160,7 @@ class Horde_Service_Facebook_Photos extends Horde_Service_Facebook_Base
         if ($this->_facebook->dataFormat == Horde_Service_Facebook::DATA_FORMAT_ARRAY) {
             $oldFormat = $this->_facebook->setInternalFormat(Horde_Service_Facebook::DATA_FORMAT_XML);
         }
-        $results = $this->_facebook->call_method('facebook.photos.get', $params);
+        $results = $this->_facebook->callMethod('facebook.photos.get', $params);
 
         if (!empty($oldFormat)) {
             $this->_facebook->setInternalFormat($oldFormat);
@@ -195,7 +195,7 @@ class Horde_Service_Facebook_Photos extends Horde_Service_Facebook_Base
         if ($this->_facebook->dataFormat == Horde_Service_Facebook::DATA_FORMAT_ARRAY) {
             $oldFormat = $this->_facebook->setInternalFormat(Horde_Service_Facebook::DATA_FORMAT_XML);
         }
-        $results = $this->_facebook->call_method('facebook.photos.getAlbums',
+        $results = $this->_facebook->callMethod('facebook.photos.getAlbums',
                                                  array('uid' => $uid,
                                                        'aids' => $aids,
                                                        'session_key' => $skey));
@@ -229,7 +229,7 @@ class Horde_Service_Facebook_Photos extends Horde_Service_Facebook_Base
         if ($this->_facebook->dataFormat == Horde_Service_Facebook::DATA_FORMAT_ARRAY) {
             $oldFormat = $this->_facebook->setInternalFormat(Horde_Service_Facebook::DATA_FORMAT_XML);
         }
-        $results = $this->_facebook->call_method('facebook.photos.getTags', array('pids' => $pids, 'session_key' => $skey));
+        $results = $this->_facebook->callMethod('facebook.photos.getTags', array('pids' => $pids, 'session_key' => $skey));
         if (!empty($oldFormat)) {
             $this->_facebook->setInternalFormat($oldFormat);
         }
index 7b4fbed..edff4a2 100644 (file)
@@ -83,7 +83,7 @@ class Horde_Service_Facebook_Request
         }
 
         $params['method'] = $method;
-        $params['api_key'] = $this->_facebook->api_key;
+        $params['api_key'] = $this->_facebook->apiKey;
         $params['call_id'] = microtime(true);
         if ($params['call_id'] <= $this->_last_call_id) {
             $params['call_id'] = $this->_last_call_id + 0.001;
index 7775c03..11c2fe2 100644 (file)
@@ -20,7 +20,7 @@ class Horde_Service_Facebook_Users extends Horde_Service_Facebook_Base
      */
     public function &getInfo($uids, $fields)
     {
-        return $this->_facebook->call_method('facebook.users.getInfo',
+        return $this->_facebook->callMethod('facebook.users.getInfo',
             array('uids' => $uids,
                   'fields' => $fields,
                   'session_key' => $this->_sessionKey));
@@ -43,7 +43,7 @@ class Horde_Service_Facebook_Users extends Horde_Service_Facebook_Base
      */
     public function &getStandardInfo($uids, $fields)
     {
-        return $this->_facebook->call_method('facebook.users.getStandardInfo',
+        return $this->_facebook->callMethod('facebook.users.getStandardInfo',
             array('uids' => $uids, 'fields' => $fields));
     }
 
@@ -60,7 +60,7 @@ class Horde_Service_Facebook_Users extends Horde_Service_Facebook_Base
                 Horde_Service_Facebook_ErrorCodes::API_EC_PARAM_SESSION_KEY);
         }
 
-        return $this->_facebook->call_method('facebook.users.getLoggedInUser',
+        return $this->_facebook->callMethod('facebook.users.getLoggedInUser',
             array('session_key' => $this->_facebook->auth->getSessionKey()));
     }
 
@@ -85,7 +85,7 @@ class Horde_Service_Facebook_Users extends Horde_Service_Facebook_Base
             $params['uid'] = $uid;
         }
 
-        return $this->_facebook->call_method('facebook.users.hasAppPermission', $params);
+        return $this->_facebook->callMethod('facebook.users.hasAppPermission', $params);
     }
 
     /**
@@ -106,7 +106,7 @@ class Horde_Service_Facebook_Users extends Horde_Service_Facebook_Base
                 Horde_Service_Facebook_ErrorCodes::API_EC_PARAM_SESSION_KEY);
         }
 
-        return $this->_facebook->call_method('facebook.users.isAppUser', $params);
+        return $this->_facebook->callMethod('facebook.users.isAppUser', $params);
     }
 
     /**
@@ -124,7 +124,7 @@ class Horde_Service_Facebook_Users extends Horde_Service_Facebook_Base
                 Horde_Service_Facebook_ErrorCodes::API_EC_PARAM_SESSION_KEY);
         }
 
-        return $this->call_method('facebook.users.isVerified', array('session_key' => $this->_facebook->auth->getSessionKey()));
+        return $this->callMethod('facebook.users.isVerified', array('session_key' => $this->_facebook->auth->getSessionKey()));
     }
 
     /**
@@ -160,7 +160,7 @@ class Horde_Service_Facebook_Users extends Horde_Service_Facebook_Base
             $params['session_key']  = $skey;
         }
 
-        return $this->_facebook->call_method('facebook.users.setStatus', $params);
+        return $this->_facebook->callMethod('facebook.users.setStatus', $params);
     }
 
 }
\ No newline at end of file
index 64d9706..b433461 100644 (file)
@@ -32,7 +32,7 @@ class Horde_Service_Facebook_Videos extends Horde_Service_Facebook_Base
                   'description' => $description,
                   'session_key' => $skey),
             $file,
-            Horde_Service_Facebook::get_facebook_url('api-video') . '/restserver.php');
+            Horde_Service_Facebook::getFacebookUrl('api-video') . '/restserver.php');
     }
 
     /**
@@ -50,7 +50,7 @@ class Horde_Service_Facebook_Videos extends Horde_Service_Facebook_Base
                                                Horde_Service_Facebook_ErrorCodes::API_EC_SESSION_REQUIRED);
         }
 
-        return $this->_facebook->call_method('facebook.video.getUploadLimits',
+        return $this->_facebook->callMethod('facebook.video.getUploadLimits',
             array('session_key' => $skey));
     }