public function application($name, array $options = array())
{
$config = $this->container->getParameter('portal_config');
if (!array_key_exists('applications', $config)) {
throw new \Exception('Required an undefined application :' . $name);
}
$found = FALSE;
foreach ($config['applications'] as $app) {
if ($app['name'] === $name) {
$found = TRUE;
break;
}
}
if (!$found) {
throw new \Exception('Required an undefined application :' . $name);
}
switch ($app['type']) {
#case 'ember-cli': {
# $content = $this->embercli($app, $options);
# break;
#}
case 'react-webpack':
$content = $this->reactwebpack($app, $options);
break;
default:
throw new \Exception('Application ' . $name . ' requires an unknown application type.');
}
return $content;
}