Futilities/v0.6/clade/App

From Woozle Writes Code
< Futilities‎ | v0.6‎ | clade
Revision as of 22:11, 20 November 2025 by Woozle (talk | contribs) (Created page with "{{page/clade/v2 |fam= {{!}} align=right {{!}} <code>{{l/ver/clade|p=ferreteria|App\Routed|Cmd}}</code> {{!}} align=center {{!}} ⇒ <code>{{l/ver/clade/base|App}}</code> ⇒ {{!}} align=left {{!}} <code>{{l/ver/clade|App|WUIDL}}</code> |alia= {{!-!}} '''Base'''* [ca,i] {{!!}} <code>{{l/ver/clade/full|p=ferreteria|App\Routed|Cmd}}</code> {{!-!}} '''Globals''' [cs] {{!!}} <code>{{l/ver/clade/full|Config|Globals}}</code> {{!-!}} '''QStr'''* [c,i] {{!!}} <code>{{l...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Clade Family
Cmd App WUIDL
Clade Aliases
Alias Clade
Base* [ca,i] App\Routed\Cmd
Globals [cs] Config\Globals
QStr* [c,i] Data\Mem\QVar\Str
Subpages

About

  • Purpose: defines standard/default behavior for all Futilities apps

History

  • 2024-01-04 As part of reorganizing the startup process, I'm changing this class-family (back?) to dynamic so we can put the instantiated version in Globals.
  • 2024-07-06 converting class cApp to interface + trait, because we may not always want to descend from the same Ferreteria App class for every Futility.
  • 2024-09-12 Pushing tApp stuff into caApp, because I don't see why it needs to be a trait.
  • 2024-09-15 Let's see if I can turn Options() into more of an incoming-Request wrapper...
  • 2024-09-22 Options() is now just a more-constrained alias for Globals::QKiosk()->GetIt().
  • 2024-11-03 Actually, we'll just have an OptionsClass() method and a NewOptions() method.
    • Minimize the amount of stuff that needs to be in the go.php file; only make things settable (via Settings) if it seems unnecessarily arbitrary otherwise.
  • 2024-11-07 OptionsClass() -> KioskClass(), NewOptions() -> NewKiosk(), Options() -> Kiosk()
  • 2024-11-14 renamed EmitStartup() -> SetupIface()
  • 2025-03-05 renamed SetupIface() -> PreInputSetup()

Code

interface iApp extends BaseIface {}
abstract class caApp extends BaseClass implements iApp {
    // ++ UI: OUTPUT ++ //

    protected function DescribeSelf() : string {
        #echo $this->ReflectObject()->Report();
        $sName = $this->NameString();
        $sVer = $this->VersionString();
        $sDate = $this->UpdateString();
        $sTitle = "$sName v$sVer ($sDate)";
        $sBar = str_repeat('=',strlen($sTitle))."\n";
        #cli_set_process_title($sVer);
        return $sBar.$sTitle.CRLF.$sBar;
    }
    abstract protected function NameString() : string;
    abstract protected function VersionString() : string;
    abstract protected function UpdateString() : string;

    // -- UI: OUTPUT -- //
}