Extends CacheArray to allow for dynamic building of the schema cache.
Expanded class hierarchy of SchemaCache
class SchemaCache extends CacheArray {
/**
* Constructs a SchemaCache object.
*/
public function __construct() {
// Cache by request method.
parent::__construct('schema:runtime:' . ($_SERVER['REQUEST_METHOD'] == 'GET'), 'cache', array(
'schema' => TRUE,
));
}
/**
* Implements CacheArray::resolveCacheMiss().
*/
protected function resolveCacheMiss($offset) {
$complete_schema = drupal_get_complete_schema();
$value = isset($complete_schema[$offset]) ? $complete_schema[$offset] : NULL;
$this->storage[$offset] = $value;
$this
->persist($offset);
return $value;
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheArray:: |
protected | property | A bin to pass to cache()->set() and cache()->get(). | |
CacheArray:: |
protected | property | A cid 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. | |
CacheArray:: |
protected | property | A tags array to pass to cache()->set(). | |
CacheArray:: |
public | function | Clear the cache. | 1 |
CacheArray:: |
public | function | Implements ArrayAccess::offsetExists(). | 1 |
CacheArray:: |
public | function | Implements ArrayAccess::offsetGet(). | 2 |
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. | 2 |
CacheArray:: |
public | function | Destructs the CacheArray object. | 2 |
SchemaCache:: |
protected | function |
Implements CacheArray::resolveCacheMiss(). Overrides CacheArray:: |
|
SchemaCache:: |
public | function |
Constructs a SchemaCache object. Overrides CacheArray:: |