/** * Sets the reference $value to the parameter value if exists in the container. * * @param ContainerInterface $container The container to read. * @param mixed $value The reference value to set. * @param string $parameter The parameter name to look for in the container. * * @return RouteCollection */ private function setValueIfParameterExists(ContainerInterface $container, &$value, $parameter) { if ($container->hasParameter($parameter)) { $value = $container->getParameter($parameter); } return $this; }