Properties

$psr0

$psr0 : array

PSR-0 prefixes

Type

array

$psr4

$psr4 : array

PSR-4 prefixes

Type

array

$classMap

$classMap : array

Class map array

Type

array

$classMapAuthoritative

$classMapAuthoritative : boolean

Class map authoritative flag

Type

boolean

Methods

__construct()

__construct(boolean  $self = true, boolean  $prepend = false, boolean  $throw = true) 

Constructor

Instantiate the class loader object

Parameters

boolean $self
boolean $prepend
boolean $throw

register()

register(boolean  $prepend, boolean  $throw = true) : \Pop\Loader\ClassLoader

Register this instance with the autoload stack

Parameters

boolean $prepend
boolean $throw

Returns

\Pop\Loader\ClassLoader

unregister()

unregister() : \Pop\Loader\ClassLoader

Unregister this instance with the autoload stack

Returns

\Pop\Loader\ClassLoader

getPsr0Prefixes()

getPsr0Prefixes() : array

Get the PSR-0 prefixes

Returns

array

getPsr4Prefixes()

getPsr4Prefixes() : array

Get the PSR-4 prefixes

Returns

array

getClassMap()

getClassMap() : array

Get the class map array

Returns

array

addClassMapFromFile()

addClassMapFromFile(string  $file) : \Pop\Loader\ClassLoader

Add a class map from file

Parameters

string $file

Throws

\Pop\Loader\Exception

Returns

\Pop\Loader\ClassLoader

addClassMapFromDir()

addClassMapFromDir(string  $dir) : \Pop\Loader\ClassLoader

Generate and add a class map from directory

Parameters

string $dir

Throws

\Pop\Loader\Exception

Returns

\Pop\Loader\ClassLoader

setClassMapAuthoritative()

setClassMapAuthoritative(boolean  $authoritative) : \Pop\Loader\ClassLoader

Set the class map as the authoritative loader, halting any searches via prefixes

Parameters

boolean $authoritative

Returns

\Pop\Loader\ClassLoader

isClassMapAuthoritative()

isClassMapAuthoritative() : boolean

Determine if the class map is the authoritative loader

Returns

boolean

add()

add(string  $prefix, string  $directory, boolean  $prepend = false) : \Pop\Loader\ClassLoader

Add a PSR-0 prefix and directory location to the autoloader instance

Parameters

string $prefix
string $directory
boolean $prepend

Throws

\Pop\Loader\Exception

Returns

\Pop\Loader\ClassLoader

addPsr4()

addPsr4(string  $prefix, string  $directory, boolean  $prepend = false) : \Pop\Loader\ClassLoader

Add a PSR-4 prefix and directory location to the autoloader instance

Parameters

string $prefix
string $directory
boolean $prepend

Throws

\Pop\Loader\Exception

Returns

\Pop\Loader\ClassLoader

addPsr0()

addPsr0(string  $prefix, string  $directory, boolean  $prepend = false) : \Pop\Loader\ClassLoader

Alias to add()

Parameters

string $prefix
string $directory
boolean $prepend

Returns

\Pop\Loader\ClassLoader

set()

set(string  $prefix, string  $directory, boolean  $prepend = false) : \Pop\Loader\ClassLoader

Alias to add()

Parameters

string $prefix
string $directory
boolean $prepend

Returns

\Pop\Loader\ClassLoader

setPsr0()

setPsr0(string  $prefix, string  $directory, boolean  $prepend = false) : \Pop\Loader\ClassLoader

Alias to add()

Parameters

string $prefix
string $directory
boolean $prepend

Returns

\Pop\Loader\ClassLoader

setPsr4()

setPsr4(string  $prefix, string  $directory, boolean  $prepend = false) : \Pop\Loader\ClassLoader

Alias to addPsr4()

Parameters

string $prefix
string $directory
boolean $prepend

Returns

\Pop\Loader\ClassLoader

findFile()

findFile(string  $class) : mixed

Find the class file

Parameters

string $class

Returns

mixed

loadClass()

loadClass(string  $class) : boolean

Find and load the class file

Parameters

string $class

Returns

boolean

__invoke()

__invoke(string  $class) : void

Invoke the class

Parameters

string $class