| Clade Aliases
|
| Alias |
Clade
|
| Base* [ca,i] |
App\Routed
|
|
About
- Purpose: App class for TTY (CLI) applications
- Parallel: Web
History
- 2024-07-06 split off from Routed so we can also implement ReceiveRequest for terminal mode (CLI)
- 2024-09-16 removed
$arArgs parameter from constructor -- it wasn't used, and we now get $argv via the Incoming Request Connection.
Code
as of 2025-10-18
interface iCmd extends BaseIface {}
abstract class caCmd extends BaseClass implements iCmd {
// ++ SETUP ++ //
// CEMENT
protected function ShowAppConfig() {
echo $this->DescribeSelf();
}
// NEW - for CLI only
protected function DescribeActions() {
echo $this->HomeKiosk()->DescribeActions()."\n";
}
// -- SETUP -- //
// ++ INFO ++ //
static public function SelfName() : string { global $argv; return $argv[0]; }
// -- INFO -- //
}
Removed Code
Nothing seems to actually use CheckSetup(). If web apps use it, it should be renamed CheckConfig() (but I searched the whole [WFe] folder and found nothing substantial).
/*----
NOTE (2024-09-12 probably obsolete): each app must define its own cOpts class.
*/
public function __construct() {
$this->CheckSetup();
}
abstract protected function CheckSetup();