You are here

class VarsExtendedTestVars in Variable API 6

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

@file

Module for testing the Variable API module.

Hierarchy

Expanded class hierarchy of VarsExtendedTestVars

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

File

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

View source
class VarsExtendedTestVars extends Vars {
  public function __construct() {
    parent::__construct('vars_extended_test');
  }
  public function getDefaults() {
    return array(
      'vars_extended_test_dynamic_first' => array(
        'value' => array(
          1.1,
        ),
        'flags' => Vars::VARS_DYNAMIC,
      ),
      'vars_extended_test_dynamic_second' => array(
        'value' => 'aaaa',
        'flags' => Vars::VARS_DYNAMIC,
      ),
      'vars_extended_test_dynamic_third' => array(
        'value' => 1111,
        'flags' => Vars::VARS_DYNAMIC,
      ),
      'vars_extended_test_dynamic_fourth' => array(
        'value' => array(
          'aaaaaaaa',
        ),
        'flags' => Vars::VARS_DYNAMIC,
      ),
      'vars_extended_test_static_first' => array(
        'value' => 1.1,
        'flags' => 0,
      ),
      'vars_extended_test_static_second' => array(
        'value' => 'aaaa',
        'flags' => 0,
      ),
      'vars_extended_test_static_third' => array(
        'value' => 1111,
        'flags' => 0,
      ),
    );
  }

}

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
VarsExtendedTestVars::getDefaults public function Returns the default value for the variables used by the module. Overrides Vars::getDefaults
VarsExtendedTestVars::__construct public function Constructs a Vars object. Overrides Vars::__construct