public function PhpFileLoader::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/PhpFileLoader.php, line 53

Class

PhpFileLoader
PhpFileLoader loads service definitions from a PHP file.

Namespace

Symfony\Component\DependencyInjection\Loader

Code

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