/** * Adds a SyncParameters object to the current list of collections * * @param SyncParameters $spa * * @access public * @return boolean */ public function AddCollection($spa) { if (!$spa->HasFolderId()) { return false; } $this->collections[$spa->GetFolderId()] = $spa; ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->AddCollection(): Folder id '%s' : ref. PolicyKey '%s', ref. Lifetime '%s', last sync at '%s'", $spa->GetFolderId(), $spa->GetReferencePolicyKey(), $spa->GetReferenceLifetime(), $spa->GetLastSyncTime())); if ($spa->HasLastSyncTime() && $spa->GetLastSyncTime() > $this->lastSyncTime) { $this->lastSyncTime = $spa->GetLastSyncTime(); // use SyncParameters PolicyKey as reference if available if ($spa->HasReferencePolicyKey()) { $this->refPolicyKey = $spa->GetReferencePolicyKey(); } // use SyncParameters LifeTime as reference if available if ($spa->HasReferenceLifetime()) { $this->refLifetime = $spa->GetReferenceLifetime(); } ZLog::Write(LOGLEVEL_DEBUG, sprintf("SyncCollections->AddCollection(): Updated reference PolicyKey '%s', reference Lifetime '%s', Last sync at '%s'", $this->refPolicyKey, $this->refLifetime, $this->lastSyncTime)); } return true; }
/** * Adds a SyncParameters object to the current list of collections * * @param SyncParameters $spa * * @access public * @return boolean */ public function AddCollection($spa) { if (!$spa->HasFolderId()) { return false; } $this->collections[$spa->GetFolderId()] = $spa; if ($spa->HasLastSyncTime() && $spa->GetLastSyncTime() > $this->lastSyncTime) { $this->lastSyncTime = $spa->GetLastSyncTime(); // use SyncParameters PolicyKey as reference if available if ($spa->HasReferencePolicyKey()) { $this->refPolicyKey = $spa->GetReferencePolicyKey(); } // use SyncParameters LifeTime as reference if available if ($spa->HasReferenceLifetime()) { $this->refLifetime = $spa->GetReferenceLifetime(); } } return true; }