From: Jan Schneider Date: Tue, 28 Dec 2010 12:05:31 +0000 (+0100) Subject: Fix method signatures. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fe65fc91ecb79868931f466dbe2d53c14ea7da17;p=horde.git Fix method signatures. --- diff --git a/kronolith/lib/Driver.php b/kronolith/lib/Driver.php index 2e5334ceb..11e7834c3 100644 --- a/kronolith/lib/Driver.php +++ b/kronolith/lib/Driver.php @@ -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); } diff --git a/kronolith/lib/Driver/Ical.php b/kronolith/lib/Driver/Ical.php index 35d41c9ed..e967cd03b 100644 --- a/kronolith/lib/Driver/Ical.php +++ b/kronolith/lib/Driver/Ical.php @@ -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; diff --git a/kronolith/lib/Driver/Kolab.php b/kronolith/lib/Driver/Kolab.php index 4abf7e5f1..c1b7c7111 100644 --- a/kronolith/lib/Driver/Kolab.php +++ b/kronolith/lib/Driver/Kolab.php @@ -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); } diff --git a/kronolith/lib/Driver/Sql.php b/kronolith/lib/Driver/Sql.php index a597ad0bc..23588fe11 100644 --- a/kronolith/lib/Driver/Sql.php +++ b/kronolith/lib/Driver/Sql.php @@ -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;