public function getRoute($name, $default = null)
{
$assets = [];
$routeMatched = false;
// Merge all assets configuration for which regular expression matches route
foreach ($this->routes as $spec => $config) {
if (preg_match('(^' . $spec . '$)i', $name)) {
$routeMatched = true;
$assets = Stdlib\ArrayUtils::merge($assets, (array) $config);
}
}
// Only return default if none regular expression matched
return $routeMatched ? $assets : $default;
}