class DebugUniversalClassLoader extends UniversalClassLoader

deprecated since version 2.4, to be removed in 3.0. Use the {@link \Symfony\Component\Debug\DebugClassLoader} class instead.

Checks that the class is actually declared in the included file.

Methods

useIncludePath(bool $useIncludePath)

Turns on searching the include for class files. Allows easy loading of installed PEAR packages.

bool
getUseIncludePath()

Can be used to check if the autoloader uses the include path to check for classes.

array
getNamespaces()

Gets the configured namespaces.

array
getPrefixes()

Gets the configured class prefixes.

array
getNamespaceFallbacks()

Gets the directory(ies) to use as a fallback for namespaces.

array
getPrefixFallbacks()

Gets the directory(ies) to use as a fallback for class prefixes.

registerNamespaceFallbacks(array $dirs)

Registers the directory to use as a fallback for namespaces.

registerNamespaceFallback(string $dir)

Registers a directory to use as a fallback for namespaces.

registerPrefixFallbacks(array $dirs)

Registers directories to use as a fallback for class prefixes.

registerPrefixFallback(string $dir)

Registers a directory to use as a fallback for class prefixes.

registerNamespaces(array $namespaces)

Registers an array of namespaces.

registerNamespace(string $namespace, array|string $paths)

Registers a namespace.

registerPrefixes(array $classes)

Registers an array of classes using the PEAR naming convention.

registerPrefix(string $prefix, array|string $paths)

Registers a set of classes using the PEAR naming convention.

register(bool $prepend = false)

Registers this instance as an autoloader.

bool|null
loadClass(string $class)

Loads the given class or interface.

string|null
findFile(string $class)

Finds the path to the file where the class is defined.

static 
enable()

Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones.

Details

in UniversalClassLoader at line line 78
useIncludePath(bool $useIncludePath)

Turns on searching the include for class files. Allows easy loading of installed PEAR packages.

Parameters

bool $useIncludePath

in UniversalClassLoader at line line 89
bool getUseIncludePath()

Can be used to check if the autoloader uses the include path to check for classes.

Return Value

bool

in UniversalClassLoader at line line 99
array getNamespaces()

Gets the configured namespaces.

Return Value

array A hash with namespaces as keys and directories as values

in UniversalClassLoader at line line 109
array getPrefixes()

Gets the configured class prefixes.

Return Value

array A hash with class prefixes as keys and directories as values

in UniversalClassLoader at line line 119
array getNamespaceFallbacks()

Gets the directory(ies) to use as a fallback for namespaces.

Return Value

array An array of directories

in UniversalClassLoader at line line 129
array getPrefixFallbacks()

Gets the directory(ies) to use as a fallback for class prefixes.

Return Value

array An array of directories

in UniversalClassLoader at line line 139
registerNamespaceFallbacks(array $dirs)

Registers the directory to use as a fallback for namespaces.

Parameters

array $dirs An array of directories

in UniversalClassLoader at line line 149
registerNamespaceFallback(string $dir)

Registers a directory to use as a fallback for namespaces.

Parameters

string $dir A directory

in UniversalClassLoader at line line 159
registerPrefixFallbacks(array $dirs)

Registers directories to use as a fallback for class prefixes.

Parameters

array $dirs An array of directories

in UniversalClassLoader at line line 169
registerPrefixFallback(string $dir)

Registers a directory to use as a fallback for class prefixes.

Parameters

string $dir A directory

in UniversalClassLoader at line line 179
registerNamespaces(array $namespaces)

Registers an array of namespaces.

Parameters

array $namespaces An array of namespaces (namespaces as keys and locations as values)

in UniversalClassLoader at line line 192
registerNamespace(string $namespace, array|string $paths)

Registers a namespace.

Parameters

string $namespace The namespace
array|string $paths The location(s) of the namespace

in UniversalClassLoader at line line 202
registerPrefixes(array $classes)

Registers an array of classes using the PEAR naming convention.

Parameters

array $classes An array of classes (prefixes as keys and locations as values)

in UniversalClassLoader at line line 215
registerPrefix(string $prefix, array|string $paths)

Registers a set of classes using the PEAR naming convention.

Parameters

string $prefix The classes prefix
array|string $paths The location(s) of the classes

in UniversalClassLoader at line line 225
register(bool $prepend = false)

Registers this instance as an autoloader.

Parameters

bool $prepend Whether to prepend the autoloader or not

at line line 58
bool|null loadClass(string $class)

Loads the given class or interface.

Parameters

string $class The name of the class

Return Value

bool|null True, if loaded

in UniversalClassLoader at line line 253
string|null findFile(string $class)

Finds the path to the file where the class is defined.

Parameters

string $class The name of the class

Return Value

string|null The path, if found

at line line 29
static enable()

Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones.