Loader
Reference for the Loader module: register class files so they load on demand. A file is mapped by its class short name and included only when that class is first used, through a lazy autoloader.
This page is a pure reference. For how the framework fits together, see the Guide.
Loader- register class files that load on demand through a lazy autoloader.
Loader
Register a class file with the loader. The file is not read at registration time; it is included on first use of the class, resolved by the class short name through a registered autoloader.
Require
Loader::Require(string $filepath): void
Register a class file so it loads on demand. The autoloader is registered on first call. The path is keyed by its base name without the .php extension, and the file is included when a class of that name is first used. Throws when the path does not end in .php.
| Name | Type | Description |
|---|---|---|
$filepath | string | The path to the class file; must end in .php. |
Returns void