Composer API
Class

Composer\Autoload\ClassMapGenerator

class ClassMapGenerator

ClassMapGenerator

Methods

static  dump(Traversable $dirs, string $file)

Generate a class map file

static array createMap(Iterator|string $path, string $blacklist = null, IOInterface $io = null, string $namespace = null)

Iterate over all files in the given directory searching for classes

Details

at line 39
static public dump(Traversable $dirs, string $file)

Generate a class map file

Parameters

Traversable $dirs Directories or a single path to search in
string $file The name of the class map file

at line 61
static public array createMap(Iterator|string $path, string $blacklist = null, IOInterface $io = null, string $namespace = null)

Iterate over all files in the given directory searching for classes

Parameters

Iterator|string $path The path to search in or an iterator
string $blacklist Regex that matches against the file path that exclude from the classmap.
IOInterface $io IO object
string $namespace Optional namespace prefix to filter by

Return Value

array A class map array

Exceptions

RuntimeException When the path is neither an existing file nor directory