public function XmlFileLoader::supports

Same name in this branch

Returns true if this class supports the given resource.

Parameters

mixed $resource A resource:

string $type The resource type:

Return value

Boolean true if this class supports the given resource, false otherwise

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php, line 70

Class

XmlFileLoader
XmlFileLoader loads XML files service definitions.

Namespace

Symfony\Component\DependencyInjection\Loader

Code

public function supports($resource, $type = null) {
  return is_string($resource) && 'xml' === pathinfo($resource, PATHINFO_EXTENSION);
}