Fix method signatures.
authorJan Schneider <jan@horde.org>
Tue, 28 Dec 2010 12:05:31 +0000 (13:05 +0100)
committerJan Schneider <jan@horde.org>
Tue, 28 Dec 2010 12:05:31 +0000 (13:05 +0100)
kronolith/lib/Driver.php
kronolith/lib/Driver/Ical.php
kronolith/lib/Driver/Kolab.php
kronolith/lib/Driver/Sql.php

index 2e5334c..11e7834 100644 (file)
@@ -221,7 +221,7 @@ class Kronolith_Driver
      * @return Kronolith_Driver  The newly created concrete Kronolith_Driver
      *                           instance.
      */
-    public function factory($driver = null, $params = null)
+    static public function factory($driver = null, $params = null)
     {
         $driver = basename($driver);
         $class = 'Kronolith_Driver_' . $driver;
@@ -303,7 +303,7 @@ class Kronolith_Driver
      * @throws Horde_Mime_Exception
      * @throws Kronolith_Exception
      */
-    public function saveEvent($event)
+    public function saveEvent(Kronolith_Event $event)
     {
         if ($event->stored || $event->exists()) {
             return $this->_updateEvent($event);
@@ -316,7 +316,7 @@ class Kronolith_Driver
      *
      * @throws Kronolith_Exception
      */
-    protected function _addEvent()
+    protected function _addEvent(Kronolith_Event $event)
     {
         throw new Kronolith_Exception($this->_errormsg);
     }
@@ -326,7 +326,7 @@ class Kronolith_Driver
      *
      * @throws Kronolith_Exception
      */
-    protected function _updateEvent()
+    protected function _updateEvent(Kronolith_Event $event)
     {
         throw new Kronolith_Exception($this->_errormsg);
     }
index 35d41c9..e967cd0 100644 (file)
@@ -402,7 +402,7 @@ class Kronolith_Driver_Ical extends Kronolith_Driver
      * @throws Horde_Mime_Exception
      * @throws Kronolith_Exception
      */
-    protected function _updateEvent($event)
+    protected function _updateEvent(Kronolith_Event $event)
     {
         $response = $this->_saveEvent($event);
         if (!in_array($response->code, array(200, 204))) {
@@ -422,7 +422,7 @@ class Kronolith_Driver_Ical extends Kronolith_Driver
      * @throws Horde_Mime_Exception
      * @throws Kronolith_Exception
      */
-    protected function _addEvent($event)
+    protected function _addEvent(Kronolith_Event $event)
     {
         if (!$event->uid) {
             $event->uid = (string)new Horde_Support_Uuid;
index 4abf7e5..c1b7c71 100644 (file)
@@ -335,7 +335,7 @@ class Kronolith_Driver_Kolab extends Kronolith_Driver
      * @return string  The event id.
      * @throws Horde_Mime_Exception
      */
-    protected function _updateEvent($event)
+    protected function _updateEvent(Kronolith_Event $event)
     {
         return $this->_saveEvent($event, true);
     }
@@ -348,7 +348,7 @@ class Kronolith_Driver_Kolab extends Kronolith_Driver
      * @return string  The event id.
      * @throws Horde_Mime_Exception
      */
-    protected function _addEvent($event)
+    protected function _addEvent(Kronolith_Event $event)
     {
         return $this->_saveEvent($event, false);
     }
index a597ad0..23588fe 100644 (file)
@@ -546,7 +546,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
      * @throws Horde_Mime_Exception
      * @throws Kronolith_Exception
      */
-    protected function _updateEvent($event)
+    protected function _updateEvent(Kronolith_Event $event)
     {
         $values = array();
         $query = 'UPDATE ' . $this->_params['table'] . ' SET ';
@@ -606,7 +606,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
      * @throws Horde_Mime_Exception
      * @throws Kronolith_Exception
      */
-    protected function _addEvent($event)
+    protected function _addEvent(Kronolith_Event $event)
     {
         if (!$event->id) {
             $event->id = (string)new Horde_Support_Randomid;