You are here

public static function ClassMapGenerator::dump in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/class-loader/ClassMapGenerator.php \Symfony\Component\ClassLoader\ClassMapGenerator::dump()

Generate a class map file.

Parameters

array|string $dirs Directories or a single path to search in:

string $file The name of the class map file:

File

vendor/symfony/class-loader/ClassMapGenerator.php, line 35

Class

ClassMapGenerator
ClassMapGenerator.

Namespace

Symfony\Component\ClassLoader

Code

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