You are here

public static function AutoloadCache::schema in Autoload 7.2

Returns schema for the table of autoloading storage.

Return value

array[] Database table schemas.

See also

autoload_schema()

1 call to AutoloadCache::schema()
autoload_schema in ./autoload.install
Implements hook_schema().

File

./autoload.cache.inc, line 368
Autoload cache controller.

Class

AutoloadCache
Class AutoloadCache.

Code

public static function schema() {
  $schema = array();
  $schema['description'] = 'Stores fallback cache of autoloading mapping.';
  foreach (array(
    'file' => 'A path to file relative to the Drupal root directory.',
    'provider' => 'Name of the module providing the file.',
    'namespace' => 'Fully-qualified path to object in terms of PHP.',
  ) as $field => $description) {
    $schema['fields'][$field] = array(
      'type' => 'varchar',
      'length' => 255,
      'default' => '',
      'not null' => TRUE,
      'description' => $description,
    );
  }
  $schema['unique keys'] = array(
    'file' => array(
      'file',
    ),
  );
  $schema['primary key'] = array(
    'namespace',
  );
  return array(
    static::BIN => $schema,
  );
}