public function purl_cache::get in Persistent URL 7
Same name and namespace in other branches
- 6 purl.module \purl_cache::get()
Parameters
$method: The method to retrieve from the cache for.
$id: Optional key of the required info.
Return value
the desired info or false if an id doesn't exist.
File
- ./
purl.module, line 827
Class
- purl_cache
- Specialized cache for storing modifier information.
Code
public function get($method = false, $id = false) {
if ($method !== false && $id !== false) {
return isset($this->cache[$method][$id]) ? $this->cache[$method][$id] : false;
}
elseif ($method !== false) {
return isset($this->cache[$method]) ? $this->cache[$method] : array();
}
else {
return $this->cache;
}
}