Horde_ActiveSync_SyncCache::setPingableCollection PHP Method

setPingableCollection() public method

Set a specific collection to be PINGable.
public setPingableCollection ( string $id )
$id string The collection id.
    public function setPingableCollection($id)
    {
        if (empty($this->_data['collections'][$id])) {
            throw new InvalidArgumentException('Collection does not exist');
        }
        $this->_data['collections'][$id]['pingable'] = true;
        $this->_markCollectionsDirty($id);
    }

Usage Example

Esempio n. 1
0
 /**
  * Marks all loaded collections with a synckey as pingable.
  */
 public function updatePingableFlag()
 {
     $collections = $this->_cache->getCollections(false);
     foreach ($collections as $id => $collection) {
         if (!empty($this->_collections[$id]['synckey'])) {
             $this->_logger->info(sprintf('Setting collection %s (%s) PINGABLE.', $collection['serverid'], $id));
             $this->_cache->setPingableCollection($id);
         } else {
             $this->_logger->info(sprintf('UNSETTING collection %s (%s) PINGABLE flag.', $collection['serverid'], $id));
             $this->_cache->removePingableCollection($id);
         }
     }
 }
All Usage Examples Of Horde_ActiveSync_SyncCache::setPingableCollection