Horde_Kolab_Storage_List_Cache::getQuery PHP Method

getQuery() public method

Return query information.
public getQuery ( string $key ) : mixed
$key string The query key.
return mixed The query data.
    public function getQuery($key)
    {
        if ($this->hasQuery($key)) {
            return $this->_data[self::QUERIES][$key];
        } else {
            throw new Horde_Kolab_Storage_Exception(sprintf('Missing query cache data (Key: %s). Synchronize first!', $key));
        }
    }

Usage Example

コード例 #1
0
ファイル: Cache.php プロジェクト: jubinpatel/horde
 /**
  * Get the default folder for a certain type from a different owner.
  *
  * @param string $owner The folder owner.
  * @param string $type  The type of the share/folder.
  *
  * @return string|boolean The name of the default folder, false if there is no default.
  */
 public function getForeignDefault($owner, $type)
 {
     $this->_initQuery(self::DEFAULTS);
     $defaults = $this->_list_cache->getQuery(self::DEFAULTS);
     if (isset($defaults[$owner][$type])) {
         return $defaults[$owner][$type];
     } else {
         return false;
     }
 }