Repository navigation
Internals Runtime Interface Api IRuntimeBaseCapabilities
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/runtime/interface/api/IRuntimeBaseCapabilities.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 cli\interfaces\CLICommand;
use runtime\enums\ERuntimeFlags;interface IRuntimeBaseCapabilitiesNo own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.
| Method | Signature |
|---|---|
| setRuntimeFlag | public function setRuntimeFlag(ERuntimeFlags $flag): void |
| waitForPackage | public function waitForPackage(string $package): void |
| setShared | public function setShared(string $name, mixed $share): void |
| getShared | public function getShared(string $name, string $shared, string $expectedType = null) : mixed |
| getPassable | public function getPassable(string $runtimeName, ?string $className = null, ?string $type = null): ?object |
| getLocalObject | public function getLocalObject(string $pathFromRoot): ?object |
| addCommand | public function addCommand(CLICommand $command): void |
public function setRuntimeFlag(ERuntimeFlags $flag): void;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$flag |
ERuntimeFlags $flag |
* @return void |
Use to tell RuntimeExecutor what this runtime provides and needs.
This information should be stored inside IRuntime.
@param ERuntimeFlags $flag
@return void
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function waitForPackage(string $package): void;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$package |
string $package |
Name of the package to be waited for. Missing or disabled targets and dependency cycles stop execution with a diagnostic. |
Use to tell RuntimeExecutor for which package this package needs to wait to be executed. This information should be stored inside IRuntime. @param string $package Name of the package to be waited for. Missing or disabled targets and dependency cycles stop execution with a diagnostic. @return void
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function setShared(string $name, mixed $share): void;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$name |
string $name |
Name of the item to be accessed by. |
$share |
mixed $share |
The shared item. |
Add a single item to the shared list.
Can be used to update a shared item.
Only works if ERuntimeFlags::UseShared is set.
@param string $name Name of the item to be accessed by.
@param mixed $share The shared item.
@return void
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function getShared(string $name, string $shared, string $expectedType = null) : mixed;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$name |
string $name |
Name of the package that is providing a shared item. |
$shared |
string $shared |
Name of the shared item. |
$expectedType |
string $expectedType = null |
Expected type of the shared item. If null, any type is allowed. |
Get a shared item from the shared list.
Only works if ERuntimeFlags::UseShared is set.
@param string $name Name of the package that is providing a shared item.
@param string $shared Name of the shared item.
@param string|null $expectedType Expected type of the shared item. If null, any type is allowed.
@return mixed
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function getPassable(string $runtimeName, ?string $className = null, ?string $type = null): ?object;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$runtimeName |
string $runtimeName |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$className |
?string $className = null |
* @return object|null |
$type |
?string $type = null |
Expected class/type or enum selection according to the signature. |
Get a passable object from other runtimes within same package.
Only works if ERuntimeFlags::AccessOtherInstances is set.
@param string $className
@return object|null
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function getLocalObject(string $pathFromRoot): ?object;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$pathFromRoot |
string $pathFromRoot |
The relative path to the class file. Example: "classes/MyClass.php" |
Returns a declared class from the file. Only works withing the same package. @param string $pathFromRoot The relative path to the class file. Example: "classes/MyClass.php" @return object|null
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function addCommand(CLICommand $command): void;| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$command |
CLICommand $command |
* @return void |
Add a command to the CLI.
Only works if ERuntimeFlags::CommandProvider is set.
Only works if the php is running in CLI mode.
@param CLICommand $command
@return void
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
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