class Psr4Loader extends AbstractLoader (View source)

Class Psr4Loader

Methods

register()

Installs this class loader on the SPL autoload stack.

unregister()

Uninstalls this class loader from the SPL autoloader stack.

loadClass(string $class)

Loads the class file for a given class name.

static string
normalizeClass(string $class)

normalizeClass

static string
normalizePath(string $path, bool $endSlash = true)

normalizePath

addNamespace(string $prefix, string $base_dir, bool $prepend = false)

Adds a base directory for a namespace prefix.

Details

Psr0Loader register()

Installs this class loader on the SPL autoload stack.

Return Value

Psr0Loader

Psr0Loader unregister()

Uninstalls this class loader from the SPL autoloader stack.

Return Value

Psr0Loader

at line line 76
Psr0Loader loadClass(string $class)

Loads the class file for a given class name.

Parameters

string $class The fully-qualified class name.

Return Value

Psr0Loader

static string normalizeClass(string $class)

normalizeClass

Parameters

string $class

Return Value

string

static string normalizePath(string $path, bool $endSlash = true)

normalizePath

Parameters

string $path
bool $endSlash

Return Value

string

at line line 41
Psr4Loader addNamespace(string $prefix, string $base_dir, bool $prepend = false)

Adds a base directory for a namespace prefix.

Parameters

string $prefix The namespace prefix.
string $base_dir A base directory for class files in the namespace.
bool $prepend If true, prepend the base directory to the stack instead of appending it; this causes it to be searched first rather than last.

Return Value

Psr4Loader