From: Michael J. Rubinsky Date: Wed, 18 Feb 2009 01:24:37 +0000 (-0500) Subject: More horde-ish method names X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fd762a8ea76af265c0d590d683015e061885bd21;p=horde.git More horde-ish method names --- diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/BatchRequest.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/BatchRequest.php index acd417a1c..6d742460d 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/BatchRequest.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/BatchRequest.php @@ -46,15 +46,15 @@ class Horde_Service_Facebook_BatchRequest extends Horde_Service_Facebook_Request foreach ($this->_queue as $batch_item) { $method = $batch_item['m']; $params = $batch_item['p']; - $this->_finalize_params($method, $params); - $method_feed[] = $this->_create_post_string($params); + $this->_finalizeParams($method, $params); + $method_feed[] = $this->_createPostString($params); } $method_feed_json = json_encode($method_feed); $serial_only = ($this->_batchMode == Horde_Service_Facebook::BATCH_MODE_SERIAL_ONLY); $params = array('method_feed' => $method_feed_json, 'serial_only' => $serial_only); - $json = $this->_post_request('batch.run', $params); + $json = $this->_postRequest('batch.run', $params); $result = json_decode($json, true); if (is_array($result) && isset($result['error_code'])) { throw new Horde_Service_Facebook_Exception($result['error_msg'], diff --git a/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php b/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php index 370594fed..429f3af82 100644 --- a/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php +++ b/framework/Service_Facebook/lib/Horde/Service/Facebook/Request.php @@ -28,7 +28,7 @@ class Horde_Service_Facebook_Request */ public function &run() { - $data = $this->_post_request($this->_method, $this->_params); + $data = $this->_postRequest($this->_method, $this->_params); $result = json_decode($data, true); if (is_array($result) && isset($result['error_code'])) { throw new Horde_Service_Facebook_Exception($result['error_msg'], $result['error_code']); @@ -36,13 +36,13 @@ class Horde_Service_Facebook_Request return $result; } - protected function _post_request($method, $params) + protected function _postRequest($method, $params) { - $this->_finalize_params($method, $params); + $this->_finalizeParams($method, $params); // TODO: Figure out why passing the array to ->post doesn't work - // we have to manually create the post string or we get an // invalid signature error from FB - $post_string = $this->_create_post_string($params); + $post_string = $this->_createPostString($params); $result = $this->_http->post(Horde_Service_Facebook::REST_SERVER_ADDR, $post_string); return $result->getBody(); } @@ -53,15 +53,15 @@ class Horde_Service_Facebook_Request * @param $params * @return unknown_type */ - protected function _finalize_params($method, &$params) + protected function _finalizeParams($method, &$params) { - $this->_add_standard_params($method, $params); + $this->_addStandardParams($method, $params); // we need to do this before signing the params - $this->convert_array_values_to_csv($params); + $this->_convertToCsv($params); $params['sig'] = Horde_Service_Facebook::generate_sig($params, $this->_facebook->secret); } - protected function _add_standard_params($method, &$params) + protected function _addStandardParams($method, &$params) { // We only support JSON $params['format'] = 'json'; @@ -81,7 +81,7 @@ class Horde_Service_Facebook_Request } } - protected function convert_array_values_to_csv(&$params) + protected function _convertToCsv(&$params) { foreach ($params as $key => &$val) { if (is_array($val)) { @@ -94,7 +94,7 @@ class Horde_Service_Facebook_Request * TODO: Figure out why using http_build_query doesn't work here. * */ - protected function _create_post_string($params) + protected function _createPostString($params) { $post_params = array(); foreach ($params as $key => &$val) {