Repository navigation
Internals Cli Interfaces CLICommand
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/cli/interfaces/CLICommand.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.
interface CLICommandNo own constants, enum cases, traits or property declarations. Inherited members are documented on the parent reference page.
| 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(): string;Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function getHelp(): string;Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function getArguments(): array;Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
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. |
Contract only: implementations supply the behavior. Parameter and return types are enforced by PHP; caller and implementation constraints follow the subsystem overview.
public function result(): string;Result should be in the format:
@return string
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