public function Vars::__construct in Variable API 6.2
Same name and namespace in other branches
- 6 vars.module \Vars::__construct()
- 7.2 vars.classes.inc \Vars::__construct()
- 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 Variable 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.module, line 29 - Implement an API to handle persistent variables.
Class
- Vars
- @file Implement an API to handle persistent variables.
Code
public function __construct($module = '', array $options = array()) {
$this->module = $module;
if (!empty($options['sysVars'])) {
$this->sysVars = $options['sysVars'];
}
$this->sysVars += array(
'admin_theme' => '0',
'book_allowed_types' => array(
'book',
),
'book_child_type' => 'book',
'cache' => CACHE_DISABLED,
'cache_inc' => './includes/cache.inc',
'clean_url' => '0',
'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_negotiation' => LANGUAGE_NEGOTIATION_NONE,
'lock_inc' => './includes/lock.inc',
'menu_rebuild_needed' => FALSE,
'page_cache_fastpath' => FALSE,
'page_compression' => TRUE,
'session_inc' => './includes/session.inc',
'site_frontpage' => 'node',
'site_offline' => 0,
'theme_default' => 'garland',
);
}