ClassLoader
array<string, array>
An associative array where the key is a namespace prefix and the value is an array of base directories for classes in that namespace.
Load the mapped file for a namespace prefix and relative class.
If a file exists, require it from the file system.
Adds a base directory for a namespace prefix.
Loads the class file for a given class name.
Register loader with SPL autoloader stack.
_loadMappedFile(string $prefix, string $relativeClass): string|false
Load the mapped file for a namespace prefix and relative class.
string
$prefix The namespace prefix.
string
$relativeClass The relative class name.
string|false
_requireFile(string $file): bool
If a file exists, require it from the file system.
string
$file The file to require.
bool
addNamespace(string $prefix, string $baseDir, bool $prepend = false): void
Adds a base directory for a namespace prefix.
string
$prefix The namespace prefix.
string
$baseDir A base directory for class files in the namespace.
bool
$prepend optional If true, prepend the base directory to the stack instead of appending it; this causes it to be searched first rather than last.
void
loadClass(string $class): string|false
Loads the class file for a given class name.
string
$class The fully-qualified class name.
string|false
register(): void
Register loader with SPL autoloader stack.
void
An associative array where the key is a namespace prefix and the value is an array of base directories for classes in that namespace.
array<string, array>
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Core.ClassLoader.html