Move method.
authorJan Schneider <jan@horde.org>
Tue, 6 Jul 2010 22:19:43 +0000 (00:19 +0200)
committerJan Schneider <jan@horde.org>
Tue, 6 Jul 2010 22:51:52 +0000 (00:51 +0200)
kronolith/lib/Driver/Ical.php

index c96663c..3bac00f 100644 (file)
@@ -184,32 +184,6 @@ class Kronolith_Driver_Ical extends Kronolith_Driver
     }
 
     /**
-     * Returns a configured, cached HTTP client.
-     *
-     * @return Horde_Http_Client  A HTTP client.
-     */
-    protected function _getClient()
-    {
-        if ($this->_client) {
-            return $this->_client;
-        }
-
-        $options = array('request.timeout' => isset($this->_params['timeout'])
-                                              ? $this->_params['timeout']
-                                              : 5);
-        if (!empty($this->_params['user'])) {
-            $options['request.username'] = $this->_params['user'];
-            $options['request.password'] = $this->_params['password'];
-        }
-
-        $this->_client = $GLOBALS['injector']
-            ->getInstance('Horde_Http_Client')
-            ->getClient($options);
-
-        return $this->_client;
-    }
-
-    /**
      * Fetches a remote calendar into the session and return the data.
      *
      * @param boolean $cache  Whether to return data from the session cache.
@@ -279,4 +253,30 @@ class Kronolith_Driver_Ical extends Kronolith_Driver
         return $ical;
     }
 
+    /**
+     * Returns a configured, cached HTTP client.
+     *
+     * @return Horde_Http_Client  A HTTP client.
+     */
+    protected function _getClient()
+    {
+        if ($this->_client) {
+            return $this->_client;
+        }
+
+        $options = array('request.timeout' => isset($this->_params['timeout'])
+                                              ? $this->_params['timeout']
+                                              : 5);
+        if (!empty($this->_params['user'])) {
+            $options['request.username'] = $this->_params['user'];
+            $options['request.password'] = $this->_params['password'];
+        }
+
+        $this->_client = $GLOBALS['injector']
+            ->getInstance('Horde_Http_Client')
+            ->getClient($options);
+
+        return $this->_client;
+    }
+
 }