Repository navigation
Internals Bootstrap Packages Loader
Framework Internals · Subsystem overview · Developer guide
Source: bootstrap/packages/loader.php · Snapshot 8411f4287706.
Bootstrap scripts wire globals, constants and collaborators in a defined order. These files are executable entry points rather than a reusable class API.
use event\EventDispatcher;
use package\model\repository\PackageRepository;
use package\model\service\PackageService;
use runtime\Runtime;
use runtime\RuntimeCreator;
use runtime\RuntimeExecutor;
use runtime\RuntimeLoader;
use runtime\RuntimeOrchestrator;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
use event\EventDispatcher;
use package\model\repository\PackageRepository;
use package\model\service\PackageService;
use runtime\Runtime;
use runtime\RuntimeCreator;
use runtime\RuntimeExecutor;
use runtime\RuntimeLoader;
use runtime\RuntimeOrchestrator;
global $shared, $eventDispatcher, $cliHandler;
$service = new PackageService(new PackageRepository());
$runtimeLoader = new RuntimeLoader($service, new RuntimeCreator(Runtime::create()));
$runtimeLoader->load();
foreach ($runtimeLoader->getLoaded() as $runtime) $runtime->setEventDispatcher($eventDispatcher);
// Keep the loader's public registries available to the existing bootstrap and packages.
$loader = new RuntimeExecutor();
$loader->sharedObjects = $shared;
$loader->CLIHandler = $cliHandler ?? null;
$orchestrator = new RuntimeOrchestrator($loader, $runtimeLoader->getLoaded(), $service->getInstalled());
$orchestrator->run();
$shared = $loader->sharedObjects;
$eventDispatcher = $loader->eventDispatcher ?? $eventDispatcher;
return $loader;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