You are here

protected function Vars::defaultValue in Variable API 7

Same name and namespace in other branches
  1. 6.2 vars.module \Vars::defaultValue()
  2. 6 vars.module \Vars::defaultValue()
  3. 7.2 vars.classes.inc \Vars::defaultValue()

Returns the default values for the variable passed as argument.

Returns the default values for the variable passed as argument. It is used to get the default value for variables defined in a module that doesn't use the Variable API module.

Parameters

$name: The name of the variable.

Return value

The default value for the variable, or NULL if it is not found.

1 call to Vars::defaultValue()
Vars::offsetGet in ./vars.module
Implements ArrayAccess::offsetGet().

File

./vars.module, line 48
Implement an API to handle persistent variables.

Class

Vars
@file Implement an API to handle persistent variables.

Code

protected function defaultValue($name) {
  return isset($this->sysVars[$name]) ? $this->sysVars[$name] : NULL;
}