Ferreteria/v0.6/clade/App/Routed/Cmd: Difference between revisions
< Ferreteria | v0.6 | clade | App | Routed
Jump to navigation
Jump to search
(Created page with "{{page/clade/v2 |fam= {{!}} align=right {{!}} {{l/ver/clade|App|Routed}} {{!}} align=center {{!}} → {{l/ver/clade|App\Routed|Cmd}} → {{!}} align=left {{!}} [WFu] {{l/ver/clade/base|p=futilities|App}} |alia= {{!}}- {{!}} '''Base'''* [ca,i] {{!!}} {{l/ver/clade/full|p=ferreteria|App|Routed}} }} ==About== * PURPOSE: {{l/ver/clade/base|App}} class for TTY (CLI) applications * '''Parallel''': {{l/same|Web}} ==History== * '''{{fmt/date|2024|07|06}}''' split off fro...") |
(No difference)
|
Revision as of 00:14, 19 October 2025
| ||||||||||||||
About
History
- 2024-07-06 split off from BaseClass 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
2024-11-15
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();