Ferreteria/v0.6/clade/Sys/Events/InputRq: Difference between revisions
< Ferreteria | v0.6 | clade | Sys | Events
Jump to navigation
Jump to search
No edit summary |
(Nope -- "Objectory" is not (no longer?) being used here.) |
||
| Line 1: | Line 1: | ||
{{page/clade/v2 | {{page/clade/v2 | ||
|fam= | |fam= | ||
{{!}} align=right {{!}} | {{!}} align=right {{!}} {{l/ver/clade|Sys\Events\has|ItWent}}[i,t] | ||
{{l/ver/clade|Sys\Events\has|ItWent}}[i,t] | |||
{{!}} align=center {{!}} → {{l/ver/clade|Sys\Events|InputRq}} → | {{!}} align=center {{!}} → {{l/ver/clade|Sys\Events|InputRq}} → | ||
{{!}} align=left {{!}} {{l/ver/clade|Sys\Events\InputRq|Setting}} | {{!}} align=left {{!}} {{l/ver/clade|Sys\Events\InputRq|Setting}} | ||
| Line 31: | Line 29: | ||
** also defined by {{l/ver/clade|Sys\Events\InputRq|Setting}} for inputs that map directly to value-names | ** also defined by {{l/ver/clade|Sys\Events\InputRq|Setting}} for inputs that map directly to value-names | ||
==Code== | ==Code== | ||
''as of 2025-10- | ''as of 2025-10-16'' | ||
{{fmt/php/block|1= | {{fmt/php/block|1= | ||
interface iInputRq extends BaseIface, HasStatusIface { | interface iInputRq extends BaseIface, HasStatusIface { | ||
| Line 49: | Line 47: | ||
// OVERRIDE | // OVERRIDE | ||
protected function QVarClass(int | protected function QVarClass(int|string $snKey) : string { return InDataClass::class; } | ||
// This tells the clade where to store the Singleton object for this podling-class-family. | // This tells the clade where to store the Singleton object for this podling-class-family. | ||
static protected function InputClass() : string { die(self::PromptForMethod('Define this in the root InputRq for the command.')); } // DEFAULT | static protected function InputClass() : string { die(self::PromptForMethod('Define this in the root InputRq for the command.')); } // DEFAULT | ||
| Line 107: | Line 105: | ||
protected function OAUserInput() : InDataIface { return self::$oaInThis ?? (self::$oaInThis = $this->NewUserInput()); } | protected function OAUserInput() : InDataIface { return self::$oaInThis ?? (self::$oaInThis = $this->NewUserInput()); } | ||
protected function NewUserInput() : InDataIface { | protected function NewUserInput() : InDataIface { | ||
$oa = (static::InputClass())::AsNew(); | $oa = (static::InputClass())::AsNew(); | ||
return $oa; | return $oa; | ||
} | } | ||
Revision as of 12:47, 16 October 2025
| ||||||||||||||||||||||
Functions
This requires the following to be defined by podlings:
- Describe() - usually defined at the application-input level (e.g. DoExportDb)
- ParseInputArgs()
- ParseInputString()
Code
as of 2025-10-16
interface iInputRq extends BaseIface, HasStatusIface {
// CONFIG
function NameOfInput() : string;
// SETUP
function Item(ItemIface $o=NULL) : ItemIface;
// ACTION
function Go();
// INFO
function Describe() : string;
}
abstract class caInputRq extends BaseClass implements SelfIface {
use HasStatusTrait;
// ++ CONFIG ++ //
// OVERRIDE
protected function QVarClass(int