Horde_ActiveSync_SyncCache::save PHP Method

save() public method

Save the synccache to storage.
public save ( )
    public function save()
    {
        // Iterate over the collections and persist the last known synckey.
        foreach ($this->_data['collections'] as $id => &$collection) {
            if (!empty($collection['synckey'])) {
                $collection['lastsynckey'] = $collection['synckey'];
                unset($collection['synckey']);
                $this->_markCollectionsDirty($id);
            }
        }
        $this->timestamp = time();
        $this->_state->saveSyncCache($this->_data, $this->_devid, $this->_user, $this->_dirty);
        $this->_dirty = array();
    }

Usage Example

Esempio n. 1
0
 public function testValidProperties()
 {
     $cache = new Horde_ActiveSync_SyncCache($this->_state, 'devid', 'userone');
     $cache->save();
     foreach (array('hbinterval', 'wait', 'hierarchy', 'confirmed_synckeys', 'lasthbsyncstarted', 'lastsyncendnormal', 'folders', 'pingheartbeat', 'timestamp') as $p) {
         $cache->{$p};
     }
 }
All Usage Examples Of Horde_ActiveSync_SyncCache::save