Ferreteria/v0.6/clade/App/Routed: Difference between revisions
< Ferreteria | v0.6 | clade | App
Jump to navigation
Jump to search
(Created page with "{{page/clade/v2 |fam= {{!}} align=right {{!}} {{l/ver/clade/base|App}} {{!}} align=center {{!}} → {{l/ver/clade|App|Routed}} → {{!}} align=left {{!}} {{l/ver/clade|App\Routed|Cmd}}<br> {{l/ver/clade|App\Routed|Web}} |alia= {{!}}- {{!}} '''Base'''* [ca,i] {{!!}} {{l/ver/clade/base|p=ferreteria|App}} {{!}}- {{!}} '''Globals''' [cs] {{!!}} {{l/ver/clade/full|p=ferreteria|Config|Globals}} {{!}}- {{!}} '''KioskIface''' {{!!}} {{l/ver/clade/full|p=ferreteria|Sys\Rou...") |
No edit summary |
||
| Line 16: | Line 16: | ||
}} | }} | ||
==About== | |||
* PURPOSE: trait for App classes that will use standard Routing management | |||
==History== | ==History== | ||
* '''{{fmt/date|2024|09|13}}''' started: extracted ReceiveRequest() from cWeb | * '''{{fmt/date|2024|09|13}}''' started: extracted ReceiveRequest() from cWeb | ||
Latest revision as of 23:41, 18 October 2025
| ||||||||||||||||||
About
- PURPOSE: trait for App classes that will use standard Routing management
History
- 2024-09-13 started: extracted ReceiveRequest() from cWeb
- 2024-11-05 HomeKiosk() is abstract for this instar, because futils app classes just create the Kiosk as needed.
- Later note: I think this means they never call it.
- 2025-03-05 Changing trait tRouted into class cRouted.
Pages
Code
as of 2025-10-18
interface iRouted extends BaseIface {}
abstract class caRouted extends BaseClass implements iRouted {
// ++ CONFIG ++ //
abstract protected function KioskClass() : string;
// -- CONFIG -- //
// ++ SETUP ++ //
// CEMENT
protected function ReadAppConfig() {
$this->HomeKiosk()->Setup();
}
// -- SETUP -- //
// ++ FACTORY ++ //
#abstract protected function HomeKiosk() : KioskIface;
private $oHK=NULL; protected function HomeKiosk() : KioskIface { return $this->oHK ?? ($this->oHK = $this->NewHomeKiosk()); }
protected function NewHomeKiosk() : KioskIface { return ($this->KioskClass())::FromGlobals(); }
// -- FACTORY -- //
// ++ ACTION ++ //
protected function ReadUserCommand() {
$oKiosk = $this->HomeKiosk();
#echo $oKiosk->ReflectThis()->Report();
$this->AmHere('Home Kiosk: '.get_class($oKiosk)); // 2025-10-14 Is this even being called??
$oKiosk->ReadInput();
}
protected function ExecuteActions() {
$oKiosk = $this->HomeKiosk();
$oKiosk->RunInput();
}
// -- ACTION -- //
}