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

Breadcrumb

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

function ClassMapGenerator::dump

Generate a class map file

Parameters

\Traversable<string>|array<string> $dirs Directories or a single path to search in:

string $file The name of the class map file:

File

vendor/composer/composer/src/Composer/Autoload/ClassMapGenerator.php, line 40

Class

ClassMapGenerator
ClassMapGenerator

Namespace

Composer\Autoload

Code

public static function dump(iterable $dirs, string $file) : void {
    $maps = [];
    foreach ($dirs as $dir) {
        $maps = array_merge($maps, static::createMap($dir));
    }
    file_put_contents($file, sprintf('<?php return %s;', var_export($maps, true)));
}

API Navigation

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