You are here

class VarsTestVars in Variable API 6

Same name and namespace in other branches
  1. 6.2 tests/vars_test.module \VarsTestVars
  2. 7.2 tests/vars_test.module \VarsTestVars
  3. 7 tests/vars_test.module \VarsTestVars

@file

Module for testing the Variable API module.

Hierarchy

Expanded class hierarchy of VarsTestVars

1 string reference to 'VarsTestVars'
VarsExtendedTestCase::testReadingVars in tests/vars.test

File

tests/vars_test.module, line 9
Module for testing the Variable API module.

View source
class VarsTestVars extends Vars {
  public function __construct() {
    parent::__construct('vars_test', array(
      'sysVars' => array(
        'menu_rebuild_needed' => FALSE,
      ),
    ));
  }
  public function getDefaults() {
    return array(
      'vars_test_first' => array(
        'value' => 100,
      ),
      'vars_test_second' => array(
        'value' => 200,
      ),
      'vars_test_third' => array(
        'value' => 300,
      ),
      'vars_test_fourth' => array(
        'value' => array(
          400,
        ),
      ),
      'vars_test_fifth' => array(
        'value' => array(
          'abcdefghil',
        ),
      ),
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Vars::$module protected property
Vars::$sysVars protected property
Vars::defaultValue protected function Returns the default values for the variable passed as argument.
Vars::deleteVariables public static function Deletes the specified persistent variables.
Vars::loadDefaults public static function Loads the default value for all the variables respecting some conditions.
Vars::offsetExists public function Implements ArrayAccess::offsetExists().
Vars::offsetGet public function Implements ArrayAccess::offsetGet().
Vars::offsetSet public function Implements ArrayAccess::offsetSet().
Vars::offsetUnset public function Implements ArrayAccess::offsetUnset().
Vars::removeDefaults public function Removes the default values contained in the table variable_default.
Vars::renameVariables public static function Renames persistent variables.
Vars::saveDefaults public function Saves the default value for the variables defined from the module.
Vars::staticReset public static function Resets one or all centrally stored static variable(s).
Vars::staticValue public static function Central static variable storage.
Vars::VARS_DYNAMIC constant The constants for the type of variable saved in the database.
Vars::VARS_NODE_TYPE constant
VarsTestVars::getDefaults public function Returns the default value for the variables used by the module. Overrides Vars::getDefaults
VarsTestVars::__construct public function Constructs a Vars object. Overrides Vars::__construct