Repository navigation
Internals Runtime
Framework Internals · Developer guide
RuntimeLoader obtains active InstalledPackage models and RuntimeCreator creates an IRuntime state object for each executable package. RuntimeOrchestrator indexes runtimes by package name, installs its runPackage callback on the executor, validates all entry points/version bounds/manifest dependency targets, and performs a graph cycle check before running package code.
RuntimeExecutor's run() loads main.php through ObjectHandler, activates package context, injects shared/passable registries and dispatcher, then calls prepareAPI() and executeAPI(). Initialization assigns API metadata and resets flags/waits. prepareAPI invokes environmentSetup(), captures state, resolves waits, calls setup(), captures again, and resolves waits again. main execution installs the VFS context responder, calls main(), captures state, registers passable/router output, then recursively executes links.
The linker creates new Runtime state for each linked component using the same package, root and dispatcher. This keeps child flags/waits separate. Links are checked through realpath for package-root containment; an active path stack detects link recursion. After a child returns, context and injection are restored to the parent. Nested dependency execution uses local API/runtime variables so executor state is not overwritten accidentally.
Orchestrator package states change to RUNNING before dependencies, EXECUTED after executor success, STOPPED on Throwable; stack cleanup happens in finally. Already loaded packages are skipped. Missing, disabled, incompatible or circular targets fail before/while scheduling rather than retrying PACKAGE_MAX_LOAD_TRY times. RuntimeFlagHandler accepts only native ERuntimeFlags and deduplicates by case name.
The legacy phased executor methods setRuntime()/initRuntime()/setupEnvironment()/setup()/execute() remain public, alongside run()/prepareAPI()/executeAPI(). Normal bootstrap uses the latter flow. Capability interfaces describe router/controller/linker roles, but actual executor enforcement is stronger for linkers and routers than for the descriptive access/controller/command flags.
-
Runtime-Runtime —
awt_src/classes/runtime/Runtime.php -
Runtime-RuntimeCreator —
awt_src/classes/runtime/RuntimeCreator.php -
Runtime-RuntimeExecutor —
awt_src/classes/runtime/RuntimeExecutor.php -
Runtime-RuntimeFlagHandler —
awt_src/classes/runtime/RuntimeFlagHandler.php -
Runtime-RuntimeLoader —
awt_src/classes/runtime/RuntimeLoader.php -
Runtime-RuntimeOrchestrator —
awt_src/classes/runtime/RuntimeOrchestrator.php -
Runtime-Api-RuntimeAPI —
awt_src/classes/runtime/api/RuntimeAPI.php -
Runtime-Api-RuntimeControllerAPI —
awt_src/classes/runtime/api/RuntimeControllerAPI.php -
Runtime-Api-RuntimeLinkerAPI —
awt_src/classes/runtime/api/RuntimeLinkerAPI.php -
Runtime-Api-RuntimeRouterAPI —
awt_src/classes/runtime/api/RuntimeRouterAPI.php -
Runtime-Enums-ERuntimeExceptionsMessage —
awt_src/classes/runtime/enums/ERuntimeExceptionsMessage.php -
Runtime-Enums-ERuntimeFlags —
awt_src/classes/runtime/enums/ERuntimeFlags.php -
Runtime-Enums-ERuntimeStatus —
awt_src/classes/runtime/enums/ERuntimeStatus.php -
Runtime-Exceptions-RuntimeException —
awt_src/classes/runtime/exceptions/RuntimeException.php -
Runtime-Interface-IRuntime —
awt_src/classes/runtime/interface/IRuntime.php -
Runtime-Interface-IRuntimeCreator —
awt_src/classes/runtime/interface/IRuntimeCreator.php -
Runtime-Interface-IRuntimeExecutor —
awt_src/classes/runtime/interface/IRuntimeExecutor.php -
Runtime-Interface-IRuntimeFlagHandler —
awt_src/classes/runtime/interface/IRuntimeFlagHandler.php -
Runtime-Interface-IRuntimeLoader —
awt_src/classes/runtime/interface/IRuntimeLoader.php -
Runtime-Interface-IRuntimeOrchestrator —
awt_src/classes/runtime/interface/IRuntimeOrchestrator.php -
Runtime-Interface-Api-IRuntimeAPI —
awt_src/classes/runtime/interface/api/IRuntimeAPI.php -
Runtime-Interface-Api-IRuntimeBaseCapabilities —
awt_src/classes/runtime/interface/api/IRuntimeBaseCapabilities.php -
Runtime-Interface-Api-IRuntimeControllerCapabilities —
awt_src/classes/runtime/interface/api/IRuntimeControllerCapabilities.php -
Runtime-Interface-Api-IRuntimeLinkerCapabilities —
awt_src/classes/runtime/interface/api/IRuntimeLinkerCapabilities.php -
Runtime-Interface-Api-IRuntimeRouterCapabilities —
awt_src/classes/runtime/interface/api/IRuntimeRouterCapabilities.php
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