Horde_Kolab_Storage_Folder_Stamp::getToken PHP 메소드

getToken() 공개 메소드

Return the sync token.
public getToken ( ) : string | boolen
리턴 string | boolen The token provided by the IMAP client, or false if unavailable.
    public function getToken();

Usage Example

예제 #1
0
파일: Base.php 프로젝트: platolin/horde
 /**
  * Report the status of this folder.
  *
  * @param Horde_Kolab_Storage_Folder_Stamp $previous  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)
 {
     if (empty($previous) || $previous->getToken() === false) {
         $this->_logger->debug('[KOLAB_STORAGE] Fetching stamp without token.');
         return $this->_driver->getStamp($this->_folder->getPath());
     }
     try {
         $this->_logger->debug('[KOLAB_STORAGE] Fetching stamp WITH token.');
         return $this->_driver->getStampFromToken($this->_folder->getPath(), $previous->getToken(), $previous->ids());
     } catch (Horde_Kolab_Storage_Exception $e) {
         // Possibly not supported with the current IMAP driver.
         $this->_logger->debug('[KOLAB_STORAGE] Attempted to fetch stamp with token, but backend did not support.');
         return $this->_driver->getStamp($this->_folder->getPath());
     }
 }
Horde_Kolab_Storage_Folder_Stamp