class ClassAliasAutoloader

Properties

protected array $classes

All of the discovered classes.

protected string $vendorPath

Path to the vendor directory.

protected Collection $includedAliases

Explicitly included namespaces/classes.

protected Collection $excludedAliases

Excluded namespaces/classes.

Methods

register(Shell $shell, string $classMapPath, array $includedAliases = [], array $excludedAliases = [])

Register a new alias loader instance.

__construct(Shell $shell, string $classMapPath, array $includedAliases = [], array $excludedAliases = [])

Create a new alias loader instance.

void
aliasClass(string $class)

Find the closest class by name.

void
unregister()

Unregister the alias loader instance.

__destruct()

Handle the destruction of the instance.

bool
isAliasable(string $class, string $path)

Determine whether a class may be aliased.

Details

at line 36
static ClassAliasAutoloader register(Shell $shell, string $classMapPath, array $includedAliases = [], array $excludedAliases = [])

Register a new alias loader instance.

Parameters

Shell $shell
string $classMapPath
array $includedAliases
array $excludedAliases

Return Value

ClassAliasAutoloader

at line 46
__construct(Shell $shell, string $classMapPath, array $includedAliases = [], array $excludedAliases = [])

Create a new alias loader instance.

Parameters

Shell $shell
string $classMapPath
array $includedAliases
array $excludedAliases

at line 74
void aliasClass(string $class)

Find the closest class by name.

Parameters

string $class

Return Value

void

at line 92
void unregister()

Unregister the alias loader instance.

Return Value

void

at line 100
__destruct()

Handle the destruction of the instance.

at line 108
bool isAliasable(string $class, string $path)

Determine whether a class may be aliased.

Parameters

string $class
string $path

Return Value

bool