Ferreteria/v0.6/clade/App/Routed

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | App
Revision as of 23:37, 18 October 2025 by Woozle (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
clade: App\Routed
Clade Family
App Routed

Cmd
Web

Clade Aliases
Alias Clade
Base* [ca,i] App
Globals [cs] Config\Globals
KioskIface Sys\Routing\Kiosk
Subpages

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 -- //
}