2013-10-04 17:14:34 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Kolab storage cache class for task objects
|
|
|
|
*
|
|
|
|
* @author Thomas Bruederli <bruederli@kolabsys.com>
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013, Kolab Systems AG <contact@kolabsys.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class kolab_storage_cache_task extends kolab_storage_cache
|
|
|
|
{
|
2018-12-21 12:23:41 +01:00
|
|
|
protected $extra_cols = array('dtstart', 'dtend');
|
2018-12-27 09:23:29 +00:00
|
|
|
protected $data_props = array('categories', 'status', 'complete', 'start', 'due');
|
2013-10-04 19:32:21 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper method to convert the given Kolab object into a dataset to be written to cache
|
|
|
|
*
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
protected function _serialize($object)
|
|
|
|
{
|
2015-08-18 12:39:55 +02:00
|
|
|
$sql_data = parent::_serialize($object);
|
2013-10-04 19:32:21 +02:00
|
|
|
|
2023-01-18 14:50:31 +01:00
|
|
|
$sql_data['dtstart'] = $this->_convert_datetime($object['start'] ?? null);
|
|
|
|
$sql_data['dtend'] = $this->_convert_datetime($object['due'] ?? null);
|
2013-10-04 19:32:21 +02:00
|
|
|
|
|
|
|
return $sql_data;
|
|
|
|
}
|
2015-08-18 12:39:55 +02:00
|
|
|
}
|