public function __construct(private readonly iterable
$configHandlers) { } public function get(string
$key): array
{ $filteredUrls =
[];
$customUrls =
[];
foreach ($this->configHandlers
as $configHandler) { $config =
$configHandler->
getSitemapConfig();
$filteredUrls =
$this->
addUrls($filteredUrls,
$config[self::EXCLUDED_URLS_KEY
]);
$customUrls =
$this->
addUrls($customUrls,
$config[self::CUSTOM_URLS_KEY
]);
} if ($key === self::EXCLUDED_URLS_KEY
) { return $filteredUrls;
} if ($key === self::CUSTOM_URLS_KEY
) { return $customUrls;
}