private function addCustomBundlesToCollection($bundlesCollection, $config_user)
{
foreach ($config_user as $config) {
foreach ($config as $bundle) {
if (!($name = @$bundle->name)) {
throw new \RuntimeException(sprintf("The parameter name on bundle is not defined."));
}
if (!($namespace = @$bundle->namespace)) {
throw new \RuntimeException(sprintf("The parameter namespace on bundle is not defined."));
}
$bundlesCollection->add(new Bundle($name, $namespace, $bundle->config));
}
}
return $bundlesCollection;
}