ClassMapper
in package
Mapper class
Tags
Table of Contents
- $files : array<string|int, mixed>
- Files
- $map : array<string|int, mixed>
- Class map
- $sources : array<string|int, mixed>
- Source directories
- __construct() : mixed
- Constructor
- addSource() : ClassMapper
- Add source directory or directories
- clearSources() : ClassMapper
- Clear sources
- generateClassMap() : ClassMapper
- Generate a class map
- getClassMap() : array<string|int, mixed>
- Get the class map
- getSources() : array<string|int, mixed>
- Get sources
- hasSource() : bool
- Determine if a source directory has been added
- writeToFile() : ClassMapper
- Write a class map to an output file
- discoverFiles() : void
- Discover files from source directory
Properties
$files
Files
protected
array<string|int, mixed>
$files
= []
$map
Class map
protected
array<string|int, mixed>
$map
= []
$sources
Source directories
protected
array<string|int, mixed>
$sources
= []
Methods
__construct()
Constructor
public
__construct([mixed $source = null ]) : mixed
Instantiate the class mapper object
Parameters
- $source : mixed = null
Return values
mixed —addSource()
Add source directory or directories
public
addSource(mixed $source) : ClassMapper
Parameters
- $source : mixed
Tags
Return values
ClassMapper —clearSources()
Clear sources
public
clearSources() : ClassMapper
Return values
ClassMapper —generateClassMap()
Generate a class map
public
generateClassMap() : ClassMapper
Return values
ClassMapper —getClassMap()
Get the class map
public
getClassMap() : array<string|int, mixed>
Return values
array<string|int, mixed> —getSources()
Get sources
public
getSources() : array<string|int, mixed>
Return values
array<string|int, mixed> —hasSource()
Determine if a source directory has been added
public
hasSource(string $source) : bool
Parameters
- $source : string
Return values
bool —writeToFile()
Write a class map to an output file
public
writeToFile(string $output) : ClassMapper
Parameters
- $output : string
Return values
ClassMapper —discoverFiles()
Discover files from source directory
protected
discoverFiles() : void