Skip to content

Commit

Permalink
cs/phpdoc etc...
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jun 5, 2015
1 parent 04040e7 commit 4a2a269
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 25 deletions.
12 changes: 12 additions & 0 deletions framework/Core/lib/Horde/Core/Kolab/Storage/HistoryPrefix.php
@@ -1,6 +1,18 @@
<?php
/**
* History system prefix generator for use with Kolab_Storage.
*
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/

/**
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
class Horde_Core_Kolab_Storage_HistoryPrefix
implements Horde_Kolab_Storage_HistoryPrefix
Expand Down
Expand Up @@ -448,10 +448,9 @@ public function backendMap($backend_ids)
* @param array $delete Backend IDs that were
* removed.
*/
public function store(array $objects,
Horde_Kolab_Storage_Folder_Stamp $stamp,
$version,
array $delete = array())
public function store(
array $objects, Horde_Kolab_Storage_Folder_Stamp $stamp, $version,
array $delete = array())
{
$this->_load();
if (!empty($delete)) {
Expand Down Expand Up @@ -520,4 +519,5 @@ public function reset()
{
$this->_data = array();
}

}
11 changes: 6 additions & 5 deletions framework/Kolab_Storage/lib/Horde/Kolab/Storage/Data/Cached.php
Expand Up @@ -8,6 +8,7 @@
* @package Kolab_Storage
* @author Gunnar Wrobel <wrobel@pardus.de>
* @author Thomas Jarosch <thomas.jarosch@intra2net.com>
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
Expand All @@ -24,6 +25,7 @@
* @package Kolab_Storage
* @author Gunnar Wrobel <wrobel@pardus.de>
* @author Thomas Jarosch <thomas.jarosch@intra2net.com>
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
Expand All @@ -35,14 +37,14 @@ class Horde_Kolab_Storage_Data_Cached
*
* @var Horde_Kolab_Storage_Cache_Data
*/
private $_data_cache;
protected $_data_cache;

/**
* Has the cache already been loaded and validated?
*
* @var boolean
*/
private $_init = false;
protected $_init = false;

/**
* Constructor.
Expand Down Expand Up @@ -81,10 +83,8 @@ private function _isInitialized()

/**
* Check if the cache has been initialized at all and synchronize it if not.
*
* @return NULL
*/
private function _init()
protected function _init()
{
if (!$this->_isInitialized()) {
$this->synchronize();
Expand Down Expand Up @@ -337,4 +337,5 @@ private function _completeSynchronization(Horde_Kolab_Storage_Folder_Stamp $stam
parent::synchronize($params);
$this->_data_cache->save();
}

}
Expand Up @@ -68,6 +68,11 @@ public function __call($method, $args)
return call_user_func_array(array($this->_data, $method), $args);
}

/**
* Set the logger for this object.
*
* @param Horde_Log_Logger $logger The logger.
*/
public function setLogger(Horde_Log_Logger $logger)
{
// noop. Needed to satisfy the interface.
Expand Down Expand Up @@ -182,8 +187,6 @@ public function create(&$object, $raw = false)
* @param boolean $raw True if the data to be stored has been provided in
* raw format.
*
* @return NULL
*
* @throws Horde_Kolab_Storage_Exception In case an error occured while
* saving the data.
*/
Expand Down Expand Up @@ -578,4 +581,5 @@ public function getQuery($name = null)

return $query;
}

}
Expand Up @@ -9,6 +9,7 @@
* @package Kolab_Storage
* @author Gunnar Wrobel <wrobel@pardus.de>
* @author Thomas Jarosch <thomas.jarosch@intra2net.com>
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
Expand All @@ -26,6 +27,7 @@
* @package Kolab_Storage
* @author Gunnar Wrobel <wrobel@pardus.de>
* @author Thomas Jarosch <thomas.jarosch@intra2net.com>
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
Expand Down
Expand Up @@ -42,7 +42,7 @@ class Horde_Kolab_Storage_Data_Query_History_Cache
*/
public function synchronize($params = array())
{
$timestamp_key = 'Kolab_History_Sync:'.$this->_data->getId();
$timestamp_key = 'Kolab_History_Sync:' . $this->_data->getId();

/**
* Check if we need to do a full synchronization. If our stored 'last_sync'
Expand Down
Expand Up @@ -35,14 +35,14 @@ class Horde_Kolab_Storage_Decorator_Log
*
* @var Horde_Kolab_Storage
*/
private $_storage;
protected $_storage;

/**
* A log handler.
*
* @var mixed
* @var Horde_Log_Logger
*/
private $_logger;
protected $_logger;

/**
* Constructor.
Expand Down
Expand Up @@ -33,14 +33,14 @@ class Horde_Kolab_Storage_Decorator_Synchronization
*
* @var Horde_Kolab_Storage
*/
private $_storage;
protected $_storage;

/**
* The synchronization strategy
*
* @var Horde_Kolab_Storage_Synchronization
*/
private $_synchronization;
protected $_synchronization;

/**
* Constructor.
Expand All @@ -49,7 +49,7 @@ class Horde_Kolab_Storage_Decorator_Synchronization
* @param Horde_Kolab_Storage_Synchronization $synchronization The synchronization strategy.
*/
public function __construct(Horde_Kolab_Storage $storage,
Horde_Kolab_Storage_Synchronization $synchronization)
Horde_Kolab_Storage_Synchronization $synchronization)
{
$this->_storage = $storage;
$this->_synchronization = $synchronization;
Expand Down Expand Up @@ -112,4 +112,5 @@ public function getData($folder, $object_type = null, $data_version = 1)
$this->_synchronization->synchronizeData($data);
return $data;
}

}
@@ -1,27 +1,25 @@
<?php
/**
* Marks a queriable class.
* Interface for a History system prefix generator.
*
* PHP version 5
*
* @category Kolab
* @package Kolab_Storage
* @author Gunnar Wrobel <wrobel@pardus.de>
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/

/**
* Marks a queriable class.
*
* Copyright 2010-2015 Horde LLC (http://www.horde.org/)
* Copyright 2015 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (LGPL). If you
* did not receive this file, see http://www.horde.org/licenses/lgpl21.
*
* @category Kolab
* @package Kolab_Storage
* @author Gunnar Wrobel <wrobel@pardus.de>
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
Expand Down
2 changes: 1 addition & 1 deletion nag/lib/Driver/Kolab.php
Expand Up @@ -245,7 +245,7 @@ public function getByUID($uids, array $tasklists = null, $getall = true)
protected function _add(array $task)
{
$object = $this->_getObject($task);
$object['uid'] = $this->_getData()->generateUid();
$object['uid'] = $this->_getData()->generateUid();
try {
$this->_getData()->create($object);
$this->_addTags($task);
Expand Down

0 comments on commit 4a2a269

Please sign in to comment.