Horde_Kolab_Storage_Data::getStamp PHP Method

getStamp() public method

Report the status of this folder.
public getStamp ( Horde_Kolab_Storage_Folder_Stamp $previous = null ) : Horde_Kolab_Storage_Folder_Stamp
$previous Horde_Kolab_Storage_Folder_Stamp The previous stamp, if available.
return Horde_Kolab_Storage_Folder_Stamp The stamp that can be used for detecting folder changes.
    public function getStamp(Horde_Kolab_Storage_Folder_Stamp $previous = null);

Usage Example

Example #1
0
 /**
  * Synchronize the preferences information with the information from the
  * backend.
  *
  * @param array $params Additional parameters.
  *
  * @return NULL
  */
 public function synchronize($params = array())
 {
     $stamp = $this->data->getStamp();
     if (isset($params['changes'])) {
         foreach ($params['changes'][Horde_Kolab_Storage_Folder_Stamp::ADDED] as $bid => $object) {
             $this->_updateLog($object['uid'], $bid, $stamp);
         }
         foreach ($params['changes'][Horde_Kolab_Storage_Folder_Stamp::DELETED] as $bid => $object) {
             $this->history->log($object, array('action' => 'delete', 'bid' => $bid, 'stamp' => $stamp));
         }
     } else {
         foreach ($this->data->getObjectToBackend() as $object => $bid) {
             $this->_updateLog($object, $bid, $stamp);
         }
     }
 }
All Usage Examples Of Horde_Kolab_Storage_Data::getStamp