Documentation

BaseClassLoader extends Threaded
in package
implements DynamicClassLoader

Interfaces, Classes, Traits and Enums

DynamicClassLoader

Table of Contents

$fallbackLookup  : Threaded|array<string|int, string>
$psr4Lookup  : Threaded|array<string|int, array<string|int, string>>
__construct()  : mixed
addPath()  : void
Adds a path to the lookup list
findClass()  : string|null
Returns the path for the class, if any
loadClass()  : bool
Called when there is a class to load
register()  : bool
appendOrPrependLookupEntry()  : void
getAndRemoveLookupEntries()  : array<string|int, string>
normalizePath()  : string

Properties

$fallbackLookup

private Threaded|array<string|int, string> $fallbackLookup

$psr4Lookup

private Threaded|array<string|int, array<string|int, string>> $psr4Lookup

Methods

addPath()

Adds a path to the lookup list

public addPath(string $namespacePrefix, string $path[, bool $prepend = false ]) : void
Parameters
$namespacePrefix : string

An empty string, or string ending with a backslash

$path : string
$prepend : bool = false
Return values
void

findClass()

Returns the path for the class, if any

public findClass(string $name) : string|null
Parameters
$name : string
Return values
string|null

loadClass()

Called when there is a class to load

public loadClass(string $name) : bool
Parameters
$name : string
Return values
bool

register()

public register([bool $prepend = false ]) : bool
Parameters
$prepend : bool = false
Return values
bool

appendOrPrependLookupEntry()

protected appendOrPrependLookupEntry(Threaded $list, string $entry, bool $prepend) : void
Parameters
$list : Threaded
$entry : string
$prepend : bool
Return values
void

getAndRemoveLookupEntries()

protected getAndRemoveLookupEntries(Threaded $list) : array<string|int, string>
Parameters
$list : Threaded
Return values
array<string|int, string>

normalizePath()

protected normalizePath(string $path) : string
Parameters
$path : string
Return values
string

Search results