1 config.inc public Config::get($key = '')

Gets data from this configuration object.

Parameters

string $key: A string that maps to a key within the configuration data. For instance in the following configuration array:

  array(
    'foo' => array(
      'bar' => 'baz',
    ),
  );
  

A key of 'foo.bar' would return the string 'baz'. However, a key of 'foo' would return array('bar' => 'baz'). If no key is specified, then the entire data array is returned.

Return value

mixed: The data that was requested.

File

core/includes/config.inc, line 648
This is the API for configuration storage.

Class

Config
Defines the default configuration object.

Code

public function get($key = '') {
  $value = $this->getOverride($key);
  if (!isset($value)) {
    $value = $this->getOriginal($key);
  }
  return $value;
}