Futilities/v0.6/clade/App
< Futilities | v0.6 | clade
Jump to navigation
Jump to search
| ||||||||||||||||||
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 -- //
}