private function addCustomPrefixesToCollection($prefixCollection, $config_user)
{
foreach ($config_user as $config) {
foreach ($config as $prefix) {
if (!($name = @$prefix->name)) {
throw new \RuntimeException(sprintf("The parameter name on prefix is not defined."));
}
if (!($path = @$prefix->path)) {
throw new \RuntimeException(sprintf("The parameter path on prefix is not defined."));
}
$prefixCollection->add(new Prefix($name, $path));
}
}
return $prefixCollection;
}