Horde_Kolab_Storage_Cache::requireParameter PHP Method

requireParameter() public method

Determine if a necessary parameter is set.
public requireParameter ( $parameters, $type, $key )
    public function requireParameter($parameters, $type, $key)
    {
        if (!isset($parameters[$key])) {
            throw new Horde_Kolab_Storage_Exception(sprintf('Unable to determine the %s cache key: The "%s" parameter is missing!', $type, $key));
        }
    }

Usage Example

コード例 #1
0
ファイル: Cache.php プロジェクト: raz0rsdge/horde
 /**
  * Compose the list key.
  */
 private function _setListId()
 {
     foreach (array('host', 'port', 'user') as $key) {
         $this->_cache->requireParameter($this->_parameters, 'list', $key);
     }
     ksort($this->_parameters);
     $this->_list_id = md5(serialize($this->_parameters));
 }