Skip to content

Internals Runtime Interface Api IRuntimeBaseCapabilities

Stefan Crkvenjakov edited this page Oct 7, 2026 · 1 revision

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.

Imports and dependencies

use cli\interfaces\CLICommand;
use runtime\enums\ERuntimeFlags;

IRuntimeBaseCapabilities

Declaration and architectural role

interface IRuntimeBaseCapabilities

Constants, enum cases, traits and properties

No own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.

Method index

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

setRuntimeFlag

Source line 29

public function setRuntimeFlag(ERuntimeFlags $flag): void;

Parameters

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.

waitForPackage

Source line 37

public function waitForPackage(string $package): void;

Parameters

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.

setShared

Source line 47

public function setShared(string $name, mixed $share): void;

Parameters

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.

getShared

Source line 58

public function getShared(string $name, string $shared, string $expectedType = null) : mixed;

Parameters

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.

getPassable

Source line 66

public function getPassable(string $runtimeName, ?string $className = null, ?string $type = null): ?object;

Parameters

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.

getLocalObject

Source line 73

public function getLocalObject(string $pathFromRoot): ?object;

Parameters

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.

addCommand

Source line 82

public function addCommand(CLICommand $command): void;

Parameters

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.

Related types

Clone this wiki locally