class Loader

Class Loader to use with PEAR installation

Methods

__construct(string $namespace = 'VirtualFileSystem', null $includePath = null)

Creates a new Loader that loads classes of the specified namespace.

setNamespaceSeparator(string $sep)

Sets the namespace separator used by classes in the namespace of this class loader.

string
getNamespaceSeparator()

Gets the namespace seperator used by classes in the namespace of this class loader.

setIncludePath(string $includePath)

Sets the base include path for all class files in the namespace of this class loader.

string
getIncludePath()

Gets the base include path for all class files in the namespace of this class loader.

setFileExtension(string $fileExtension)

Sets the file extension of class files in the namespace of this class loader.

string
getFileExtension()

Gets the file extension of class files in the namespace of this class loader.

register(bool $prepend = false)

Installs this class loader on the SPL autoload stack.

unregister()

Uninstalls this class loader from the SPL autoloader stack.

void
loadClass(string $className)

Loads the given class or interface.

Details

at line 41
__construct(string $namespace = 'VirtualFileSystem', null $includePath = null)

Creates a new Loader that loads classes of the specified namespace.

Parameters

string $namespace The namespace to use.
null $includePath

at line 52
setNamespaceSeparator(string $sep)

Sets the namespace separator used by classes in the namespace of this class loader.

Parameters

string $sep The separator to use.

at line 62
string getNamespaceSeparator()

Gets the namespace seperator used by classes in the namespace of this class loader.

Return Value

string

at line 72
setIncludePath(string $includePath)

Sets the base include path for all class files in the namespace of this class loader.

Parameters

string $includePath

at line 82
string getIncludePath()

Gets the base include path for all class files in the namespace of this class loader.

Return Value

string $includePath

at line 92
setFileExtension(string $fileExtension)

Sets the file extension of class files in the namespace of this class loader.

Parameters

string $fileExtension

at line 102
string getFileExtension()

Gets the file extension of class files in the namespace of this class loader.

Return Value

string $fileExtension

at line 112
register(bool $prepend = false)

Installs this class loader on the SPL autoload stack.

Parameters

bool $prepend If true, prepend autoloader on the autoload stack

at line 120
unregister()

Uninstalls this class loader from the SPL autoloader stack.

at line 131
void loadClass(string $className)

Loads the given class or interface.

Parameters

string $className The name of the class to load.

Return Value

void