You are here

protected function Vars::defaultValue in Variable API 6.2

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

Returns the default values for the variable passed as argument.

Return 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 94
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;
}