Last active
March 11, 2024 12:23
-
-
Save COil/f45bd0b96d1162c984a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Load all ressources needed for the current website. | |
* | |
* @param LoaderInterface $loader | |
*/ | |
public function registerContainerConfiguration(LoaderInterface $loader) | |
{ | |
// Load generic configuration | |
$loader->load(__DIR__.'/config/config.yml'); | |
// Load website configuration | |
$loader->load(__DIR__.'/config/website/'.$this->website.'/config.yml'); | |
// Load environment specific configuration | |
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); | |
} | |
/** | |
* Set the website depending on the Apache env var "sf_site". | |
*/ | |
public function setWebsite() | |
{ | |
if (getenv('sf_site')) { | |
$this->website = getenv('sf_site'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment