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

Breadcrumb

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

function ClassMapGenerator::createMap

Same name in this branch
  1. 11.1.x vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php \Composer\Autoload\ClassMapGenerator::createMap()

Iterate over all files in the given directory searching for classes

Parameters

string|\Traversable<\SplFileInfo>|array<\SplFileInfo> $path The path to search in or an array/traversable of SplFileInfo (e.g. symfony/finder instance):

Return value

array<class-string, non-empty-string> A class map array

Throws

\RuntimeException When the path is neither an existing file nor directory

File

vendor/composer/class-map-generator/src/ClassMapGenerator.php, line 79

Class

ClassMapGenerator
ClassMapGenerator

Namespace

Composer\ClassMapGenerator

Code

public static function createMap($path) : array {
    $generator = new self();
    $generator->scanPaths($path);
    return $generator->getClassMap()
        ->getMap();
}

API Navigation

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