private function getProfile($name)
{
$profiles = $this->container->getParameter('profiles');
if (!array_key_exists($name, $profiles)) {
throw new \Exception(sprintf('There is no profile with the name \'%s\', expecting: (%s)', $name, implode(', ', array_keys($profiles))));
}
return $profiles[$name];
}