Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PhpFileLoader.php

function PhpFileLoader::supports

Same name in this branch
  1. 11.1.x vendor/symfony/routing/Loader/PhpFileLoader.php \Symfony\Component\Routing\Loader\PhpFileLoader::supports()

File

vendor/symfony/dependency-injection/Loader/PhpFileLoader.php, line 79

Class

PhpFileLoader
PhpFileLoader loads service definitions from a PHP file.

Namespace

Symfony\Component\DependencyInjection\Loader

Code

public function supports(mixed $resource, ?string $type = null) : bool {
    if (!\is_string($resource)) {
        return false;
    }
    if (null === $type && 'php' === pathinfo($resource, \PATHINFO_EXTENSION)) {
        return true;
    }
    return 'php' === $type;
}
RSS feed
Powered by Drupal