From: Michael J. Rubinsky Date: Sat, 28 Feb 2009 18:23:22 +0000 (-0500) Subject: Clean up - standardize on camelCase method names etc... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b03c9bfe90a29e0a49dbfdd530675749dcd31333;p=horde.git Clean up - standardize on camelCase method names etc... --- diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook.php b/framework/Service_Facebook/lib/Horde/Service/Facebook.php index 13a68adde..cdfe8cbcc 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook.php @@ -49,32 +49,32 @@ 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; diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Auth.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Auth.php index b7687d113..82b0a4e72 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Auth.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Auth.php @@ -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); } diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Events.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Events.php index 691fe04d6..45c57e6e1 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Events.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Events.php @@ -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())); @@ -105,7 +105,7 @@ */ 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())); } @@ -120,7 +120,7 @@ */ 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())); diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Feeds.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Feeds.php index 7971f8132..170141e3d 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Feeds.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Feeds.php @@ -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 diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Fql.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Fql.php index 55aaf0f79..8b676aeb7 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Fql.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Fql.php @@ -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 diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Friends.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Friends.php index 6bb3c2a43..65e4e6acf 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Friends.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Friends.php @@ -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())); } diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Groups.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Groups.php index 6d1ea0c01..0b549cd56 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Groups.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Groups.php @@ -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)); } diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Links.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Links.php index e99bd49a4..eb37f053a 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Links.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Links.php @@ -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, diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Notes.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Notes.php index 84508f409..05d5757cd 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Notes.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Notes.php @@ -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))); diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Notifications.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Notifications.php index 697582cfe..e0e867177 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Notifications.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Notifications.php @@ -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, diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Photos.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Photos.php index e96abfeaa..212a5c0e7 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Photos.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Photos.php @@ -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); } diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php index 7b4fbed3a..edff4a2fb 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php @@ -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; diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Users.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Users.php index 7775c0381..11c2fe2aa 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Users.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Users.php @@ -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 diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Videos.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Videos.php index 64d970663..b433461df 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Videos.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Videos.php @@ -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)); }