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

Breadcrumb

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

function ObjectLoader::addClassResource

1 call to ObjectLoader::addClassResource()
ObjectLoader::load in vendor/symfony/routing/Loader/ObjectLoader.php
Calls the object method that will load the routes.

File

vendor/symfony/routing/Loader/ObjectLoader.php, line 65

Class

ObjectLoader
A route loader that calls a method on an object to load the routes.

Namespace

Symfony\Component\Routing\Loader

Code

private function addClassResource(\ReflectionClass $class, RouteCollection $collection) : void {
    do {
        if (is_file($class->getFileName())) {
            $collection->addResource(new FileResource($class->getFileName()));
        }
    } while ($class = $class->getParentClass());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal