Repository navigation
Internals Awt_src Functions Awt_autoLoader
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/functions/awt_autoLoader.fun.php · Snapshot 8411f4287706.
Global helpers register autoloading and exception handlers or construct the application base URL from the request and settings.
The script below is executed by its caller. Constants, registered callbacks, global assignments, guards, included files and their order are preserved here. Unlike class methods, entry-point execution can start the CLI loop, route a request, emit output, or terminate the process.
<?php
spl_autoload_register(/**
* @throws Exception
*/ function ($classname): void {
$class = str_replace('\\', DIRECTORY_SEPARATOR, $classname);
if (file_exists(CLASSES . $class . '.php')) {
include_once CLASSES . $class . '.php';
} else if (file_exists(PACKAGES . $class . ".php")) {
include_once PACKAGES . $class . '.php';
} else {
throw new Exception("Class $classname not found");
}
});AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes