Extends CacheArray to lazy load .info properties for modules.
Use system_get_module_info() rather than instantiating this class directly.
Expanded class hierarchy of ModuleInfo
class ModuleInfo extends CacheArray {
/**
* The full module info array as returned by system_get_info().
*/
protected $info;
/**
* Implements CacheArray::resolveCacheMiss().
*/
function resolveCacheMiss($offset) {
$data = array();
if (!isset($this->info)) {
$this->info = system_get_info('module');
}
foreach ($this->info as $module => $info) {
if (isset($info[$offset])) {
$data[$module] = $info[$offset];
}
}
$this->storage[$offset] = $data;
$this
->persist($offset);
return $data;
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ModuleInfo:: |
function |
Implements CacheArray::resolveCacheMiss(). Overrides CacheArray:: |
||
CacheArray:: |
public | function | Constructs a CacheArray object. | 3 |
CacheArray:: |
public | function | Implements ArrayAccess::offsetExists(). | 1 |
CacheArray:: |
public | function | Implements ArrayAccess::offsetGet(). | 1 |
CacheArray:: |
public | function | Implements ArrayAccess::offsetSet(). | |
CacheArray:: |
public | function | Implements ArrayAccess::offsetUnset(). | |
CacheArray:: |
protected | function | Flags an offset value to be written to the persistent cache. | |
CacheArray:: |
protected | function | Writes a value to the persistent cache immediately. | 1 |
CacheArray:: |
public | function | Destructs the CacheArray object. | |
ModuleInfo:: |
protected | property | The full module info array as returned by system_get_info(). | |
CacheArray:: |
protected | property | A cid to pass to cache()->set() and cache()->get(). | |
CacheArray:: |
protected | property | A tags array to pass to cache()->set(). | |
CacheArray:: |
protected | property | A bin to pass to cache()->set() and cache()->get(). | |
CacheArray:: |
protected | property | An array of keys to add to the cache at the end of the request. | |
CacheArray:: |
protected | property | Storage for the data itself. |