Repository navigation
Internals Runtime RuntimeLoader
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/runtime/RuntimeLoader.php · Snapshot 8411f4287706.
Runtime state, package API classes, loader, executor and orchestrator have separate responsibilities. Dependency validation precedes package code and nested execution restores context.
use package\model\service\interface\IPackageService;
use runtime\interface\IRuntimeCreator;
use runtime\interface\IRuntimeLoader;class RuntimeLoader implements IRuntimeLoaderDeclarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.
| Member | Declaration | Purpose or source contract |
|---|---|---|
| $runtimes | public array $runtimes = []; |
Used by load(), getLoaded(). |
| Constructor-promoted | public function __construct(private IPackageService $packageService |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Constructor-promoted | private IRuntimeCreator $runtimeCreator) |
Initialized from the constructor argument; default expression is evaluated when the argument is omitted. |
| Method | Signature |
|---|---|
| __construct | public function __construct(private IPackageService $packageService, private IRuntimeCreator $runtimeCreator) |
| load | public function load(): void |
| getLoaded | public function getLoaded(): array |
public function __construct(private IPackageService $packageService, private IRuntimeCreator $runtimeCreator);| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$packageService |
private IPackageService $packageService |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$runtimeCreator |
private IRuntimeCreator $runtimeCreator |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Concrete no-op/default hook: this method performs no work. Override it where the lifecycle or extension contract calls for behavior.
public function load(): voidState writes: $this->runtimes, $this->runtimes[].
Implementation, validation guards and interaction order
public function load(): void
{
$this->runtimes = [];
foreach ($this->packageService->getActive() as $package) {
if ($package->getType() !== 0) $this->runtimes[] = $this->runtimeCreator->create($package);
}
}public function getLoaded(): arrayReturn expressions (including local callbacks): $this->runtimes.
Implementation, validation guards and interaction order
public function getLoaded(): array { return $this->runtimes; }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