private function addCustomNamespacesToCollection($nsCollection, $config_user)
{
foreach ($config_user as $config) {
foreach ($config as $namespace) {
if (!($name = @$namespace->name)) {
throw new \RuntimeException(sprintf("The parameter name on namespace is not defined."));
}
if (!($path = @$namespace->path)) {
throw new \RuntimeException(sprintf("The parameter path on namespace is not defined."));
}
$nsCollection->add(new Nspace($name, $this->extractPath($path)));
}
}
return $nsCollection;
}