function EnvPlaceholderParameterBag::getEnvPlaceholderUniquePrefix
Gets the common env placeholder prefix for env vars created by this bag.
1 call to EnvPlaceholderParameterBag::getEnvPlaceholderUniquePrefix()
- EnvPlaceholderParameterBag::get in vendor/
symfony/ dependency-injection/ ParameterBag/ EnvPlaceholderParameterBag.php - Gets a service container parameter.
File
-
vendor/
symfony/ dependency-injection/ ParameterBag/ EnvPlaceholderParameterBag.php, line 64
Class
- EnvPlaceholderParameterBag
- @author Nicolas Grekas <p@tchwork.com>
Namespace
Symfony\Component\DependencyInjection\ParameterBagCode
public function getEnvPlaceholderUniquePrefix() : string {
if (!isset($this->envPlaceholderUniquePrefix)) {
$reproducibleEntropy = unserialize(serialize($this->parameters));
array_walk_recursive($reproducibleEntropy, function (&$v) {
$v = null;
});
$this->envPlaceholderUniquePrefix = 'env_' . substr(hash('xxh128', serialize($reproducibleEntropy)), -16);
}
return $this->envPlaceholderUniquePrefix;
}