public function ConfigFactory::reset

Resets and re-initializes configuration objects. Internal use only.

Parameters

string $name: (optional) The name of the configuration object to reset. If omitted, all configuration objects are reset.

Return value

\Drupal\Core\Config\ConfigFactory The config factory object.

File

drupal/core/lib/Drupal/Core/Config/ConfigFactory.php, line 97
Definition of Drupal\Core\Config\ConfigFactory.

Class

ConfigFactory
Defines the configuration object factory.

Namespace

Drupal\Core\Config

Code

public function reset($name = NULL) {
  if ($name) {

    // Clear the cached configuration object in all contexts.
    foreach ($this
      ->getCacheKeys($name) as $cache_key) {
      unset($this->cache[$cache_key]);
    }
  }
  else {
    $this->cache = array();
  }
  return $this;
}