Skip to content

Instantly share code, notes, and snippets.

@ivoba
Created May 23, 2012 13:40
Show Gist options
  • Save ivoba/2775277 to your computer and use it in GitHub Desktop.
Save ivoba/2775277 to your computer and use it in GitHub Desktop.
AppKernel.php registerContainerConfiguration for config_local.yml
public function registerContainerConfiguration(LoaderInterface $loader) {
if ($this->getEnvironment() == 'dev') {
$extrafiles = array(
__DIR__ . '/config/config_local.yml',
);
foreach ($extrafiles as $filename) {
if (file_exists($filename) && is_readable($filename)) {
$loader->load($filename);
}
}
} else {
$loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment