Copyright 2011-2016 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.
저자: Gunnar Wrobel (wrobel@pardus.de)
예제 #1
0
 public function testDuplicateDataSynchronization()
 {
     $synchronization = new Horde_Kolab_Storage_Synchronization();
     $data = $this->getMock('Horde_Kolab_Storage_Data_Base', array(), array(), '', false, false);
     $data->expects($this->once())->method('synchronize');
     $synchronization->synchronizeData($data);
     $synchronization->synchronizeData($data);
 }
예제 #2
0
 /**
  * Return a data handler for accessing data in the specified
  * folder.
  *
  * @param string $folder       The name of the folder.
  * @param string $object_type  The type of data we want to
  *                             access in the folder.
  * @param int    $data_version Format version of the object data.
  *
  * @return Horde_Kolab_Storage_Data The data object.
  */
 public function getData($folder, $object_type = null, $data_version = 1)
 {
     $data = $this->_storage->getData($folder, $object_type, $data_version);
     $this->_synchronization->synchronizeData($data);
     return $data;
 }
예제 #3
0
 /**
  * Synchronize the provided data in case the selected synchronization
  * strategy requires it.
  *
  * @param Horde_Kolab_Storage_Data $data The data to synchronize.
  */
 public function synchronizeData(Horde_Kolab_Storage_Data $data)
 {
     $this->_strategy->synchronizeData($data);
 }