function YamlFileLoader::supports
Same name in this branch
- 11.1.x vendor/symfony/routing/Loader/YamlFileLoader.php \Symfony\Component\Routing\Loader\YamlFileLoader::supports()
File
-
vendor/
symfony/ dependency-injection/ Loader/ YamlFileLoader.php, line 189
Class
- YamlFileLoader
- YamlFileLoader loads YAML files service definitions.
Namespace
Symfony\Component\DependencyInjection\LoaderCode
public function supports(mixed $resource, ?string $type = null) : bool {
if (!\is_string($resource)) {
return false;
}
if (null === $type && \in_array(pathinfo($resource, \PATHINFO_EXTENSION), [
'yaml',
'yml',
], true)) {
return true;
}
return \in_array($type, [
'yaml',
'yml',
], true);
}