Horde_ActiveSync_SyncCache::updateFiltertype PHP Method

updateFiltertype() public method

Update the filtertype for the specified collection.
Since: 2.26.0
public updateFiltertype ( string $id, integer $filtertype )
$id string The collection id.
$filtertype integer The updated filtertype.
    public function updateFiltertype($id, $filtertype)
    {
        $this->_data['collections'][$id]['filtertype'] = $filtertype;
        $this->_markCollectionsDirty($id);
    }

Usage Example

Esempio n. 1
0
 /**
  * Check for an update FILTERTYPE
  *
  * @param string $id      The collection id to check
  * @param string $filter  The new filter value.
  *
  * @return boolean  True if filtertype passed, false if it has changed.
  */
 public function checkFilterType($id, $filter)
 {
     $cc = $this->_cache->getCollections();
     if (!empty($cc[$id]['filtertype']) && !is_null($filter) && $cc[$id]['filtertype'] != $filter) {
         $this->_logger->info(sprintf('[%s] Filtertype change from: %d to %d', $this->_procid, $cc[$id]['filtertype'], $filter));
         $this->_cache->updateFiltertype($id, $filter);
         return false;
     }
     return true;
 }