* @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;
* @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);
*
* @throws Kronolith_Exception
*/
- protected function _addEvent()
+ protected function _addEvent(Kronolith_Event $event)
{
throw new Kronolith_Exception($this->_errormsg);
}
*
* @throws Kronolith_Exception
*/
- protected function _updateEvent()
+ protected function _updateEvent(Kronolith_Event $event)
{
throw new Kronolith_Exception($this->_errormsg);
}
* @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))) {
* @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;
* @return string The event id.
* @throws Horde_Mime_Exception
*/
- protected function _updateEvent($event)
+ protected function _updateEvent(Kronolith_Event $event)
{
return $this->_saveEvent($event, true);
}
* @return string The event id.
* @throws Horde_Mime_Exception
*/
- protected function _addEvent($event)
+ protected function _addEvent(Kronolith_Event $event)
{
return $this->_saveEvent($event, false);
}
* @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 ';
* @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;