Repository navigation
Internals Cli Commands VersionCommand
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/cli/commands/VersionCommand.php · Snapshot 8411f4287706.
The CLI registers command objects and executes one command, then returns to a readline loop. Help and clear have special handling in the loop.
use cli\interfaces\CLICommand;class VersionCommand implements CLICommandDeclarations 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 |
|---|---|---|
| $lastResult | private string $lastResult = ''; |
Used by execute(), result(). |
| Method | Signature |
|---|---|
| getCommand | public function getCommand(): string |
| getHelp | public function getHelp(): string |
| getArguments | public function getArguments(): array |
| execute | public function execute(string $command, array $args = []): void |
| result | public function result(): string |
public function getCommand(): stringReturn expressions (including local callbacks): 'version'.
Implementation, validation guards and interaction order
public function getCommand(): string
{
return 'version';
}public function getHelp(): stringReturn expressions (including local callbacks): "Display current AWT version\nPrints application version.".
Implementation, validation guards and interaction order
public function getHelp(): string
{
return "Display current AWT version\nPrints application version.";
}public function getArguments(): arrayReturn expressions (including local callbacks): [].
Implementation, validation guards and interaction order
public function getArguments(): array
{
return [];
}public function execute(string $command, array $args = []): void| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$command |
string $command |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$args |
array $args = [] |
Ordered arguments passed to the command or method. |
State writes: $this->lastResult.
Implementation, validation guards and interaction order
public function execute(string $command, array $args = []): void
{
$this->lastResult = AWT_VERSION;
}public function result(): stringReturn expressions (including local callbacks): $this->lastResult.
Implementation, validation guards and interaction order
public function result(): string
{
return $this->lastResult;
}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