Ferreteria/v0.6/clade/Sys/Events/InputRq: Difference between revisions

From Woozle Writes Code
< 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|Aux\StandardBase|Objectory}}[c]<br>
{{l/ver/clade|Sys\Events\has|ItWent}}[i,t]
{{!}} align=center {{!}} &rarr; {{l/ver/clade|Sys\Events|InputRq}} &rarr;
{{!}} align=center {{!}} &rarr; {{l/ver/clade|Sys\Events|InputRq}} &rarr;
{{!}} 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-07''
''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{{!}}string $snKey) : string { return InDataClass::class; }
     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 {
        echo 'NewUserInput() in '.get_called_class().CRLF;
         $oa = (static::InputClass())::AsNew();
         $oa = (static::InputClass())::AsNew();
        #return $oa->GetItQ('data',InDataClass::class);  // a bit klugey? Register doesn't normally store InDataClass objects.
         return $oa;
         return $oa;
     }
     }

Revision as of 12:47, 16 October 2025

clade: Sys\Events\InputRq
Clade Family
ItWent[i,t] InputRq Setting
Clade Aliases
Alias Clade
Base* [c,i] Aux\StandardBase
HasStatus* [i,t] Sys\Events\has\ItWent
InRqData* [c,i] Sys\Events\InputRq\aux\InRqData
Item* [i] Sys\Events\InputItem
Piece* [i] Sys\Data\Things\Array\aux\Piece
Subpages

Functions

This requires the following to be defined by podlings:

  • Describe() - usually defined at the application-input level (e.g. DoExportDb)
  • ParseInputArgs()
    • typically defined at the application level (e.g. InReq)
    • also defined by Setting for inputs that map directly to value-names
  • ParseInputString()
    • typically defined at the application level (e.g. InReq)
    • also defined by Setting for inputs that map directly to value-names

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