public function config($configname = null)
{
if (!is_null($configname) && !preg_match('/^[a-z0-9\\.]+$/i', $configname)) {
throw new \Exception("Cannot access requested config in BootCamp Twig extension.");
}
if (is_null($configname)) {
$configname = 'main';
}
return $this->container->get('config.' . $configname);
}