You are here

public function Vars::__construct in Variable API 7.2

Same name and namespace in other branches
  1. 6.2 vars.module \Vars::__construct()
  2. 6 vars.module \Vars::__construct()
  3. 7 vars.module \Vars::__construct()

Constructs a Vars object.

Parameters

$module: The name of the module that implements the class.

$options: An array of options. The currently defined option is 'sysVars', used to define the default values for variables defined from modules not using Variables API.

2 calls to Vars::__construct()
VarsExtendedTestVars::__construct in tests/vars_extended_test.module
Constructs a Vars object.
VarsTestVars::__construct in tests/vars_test.module
Constructs a Vars object.
2 methods override Vars::__construct()
VarsExtendedTestVars::__construct in tests/vars_extended_test.module
Constructs a Vars object.
VarsTestVars::__construct in tests/vars_test.module
Constructs a Vars object.

File

./vars.classes.inc, line 29
Classes implemented by the Variable API module.

Class

Vars
@file Classes implemented by the Variable API module.

Code

public function __construct($module = 'vars', array $options = array()) {
  $this->module = $module;
  if (!empty($options['sysVars'])) {
    $this->sysVars = $options['sysVars'];
  }
  $this->sysVars += array(
    'admin_theme' => NULL,
    'book_allowed_types' => array(
      'book',
    ),
    'book_child_type' => 'book',
    'cache' => 0,
    'cache_backends' => array(),
    'clean_url' => FALSE,
    'https' => FALSE,
    'install_profile' => 'default',
    'language_count' => 1,
    'language_default' => (object) array(
      'language' => 'en',
      'name' => 'English',
      'native' => 'English',
      'direction' => 0,
      'enabled' => 1,
      'plurals' => 0,
      'formula' => '',
      'domain' => '',
      'prefix' => '',
      'weight' => 0,
      'javascript' => '',
    ),
    'language_native_enabled' => TRUE,
    'lock_inc' => 'includes/lock.inc',
    'maintenance_mode' => 0,
    'menu_inc' => 'includes/menu.inc',
    'menu_masks' => array(),
    'menu_rebuild_needed' => FALSE,
    'node_admin_theme' => NULL,
    'page_cache_invoke_hooks' => TRUE,
    'page_cache_without_database' => FALSE,
    'path_inc' => 'includes/path.inc',
    'session_inc' => 'includes/session.inc',
    'site_frontpage' => 'node',
    'site_offline' => FALSE,
    'theme_default' => 'bartik',
  );
}