Slide 29
Slide 29 text
OVERRIDE THE ENVIRONMENT VARIABLES
➤ All environment variables begin with SYMFONY__
➤ In the app/AppKernel class, implement getEnvParameters (call the parent first).
// Symfony\Component\HttpKernel\Kernel
protected function getEnvParameters()
{
$parameters = array();
foreach ($_SERVER as $key => $value) {
if (0 === strpos($key, 'SYMFONY__')) {
$parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value;
}
}
return $parameters;
}