Skip to content

Instantly share code, notes, and snippets.

@arghav
Created January 28, 2012 17:06
Show Gist options
  • Save arghav/1695045 to your computer and use it in GitHub Desktop.
Save arghav/1695045 to your computer and use it in GitHub Desktop.
<?php
// app/AppKernel.php
public function registerContainerConfiguration(LoaderInterface $loader)
{
$envParameters = $this->getEnvParameters();
if (@$envParameters['domain.name'] == 'domain2') {
$loader->load(__DIR__.'/config/domain2/config_'.$this->getEnvironment().'.yml');
} else {
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
}
public function getCacheDir()
{
$envParameters = $this->getEnvParameters();
if (@$envParameters['domain.name'] == 'domain2') {
$cacheDir = $this->rootDir.'/cache/domain2/'.$this->environment;
} else {
$cacheDir = $this->rootDir.'/cache/'.$this->environment;
}
return $cacheDir;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment