Futilities/v0.6/clade/Sys/dba/InReq: Difference between revisions

From Woozle Writes Code
< Futilities‎ | v0.6‎ | clade‎ | Sys‎ | dba
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{page/clade}}
{{page/clade/v2
{| style="border: 1px solid black; float: right;"
|fam=
! colspan=3 | Clade Family
{{!}} align=right {{!}}
|-
| align=right |
[WFe]{{l/ver/clade|p=Ferreteria|Sys\Data\Engine\aux\is|RqActor}} [t]<br>
[WFe]{{l/ver/clade|p=Ferreteria|Sys\Data\Engine\aux\is|RqActor}} [t]<br>
(base){{l/ver/clade/base|InReq}}
(base){{l/ver/clade/base|InReq}}
| &rarr; {{l/ver/clade|Sys\dba|InReq}}
{{!}} &rarr; {{l/ver/clade|Sys\dba|InReq}} &rarr;
|
{{!}}
&rarr; {{l/ver/clade|Sys\dba\InReq|DoExport}}<br>
&rarr; {{l/ver/clade|Sys\dba\InReq|DoExport}}<br>
&rarr; {{l/ver/clade|Sys\dba\InReq|DoImport}}<br>
&rarr; {{l/ver/clade|Sys\dba\InReq|DoImport}}<br>
Line 16: Line 14:
&rarr; {{l/ver/clade|Sys\dba\InReq|SetFolder}}<br>
&rarr; {{l/ver/clade|Sys\dba\InReq|SetFolder}}<br>
&rarr; {{l/ver/clade|Sys\dba\InReq|Value}}
&rarr; {{l/ver/clade|Sys\dba\InReq|Value}}
|}
 
|alia=
{{!}}-
{{!}} '''Array'''* [i] {{!!}} [WFe]{{l/ver/clade/full|p=ferreteria|Sys\Data\Things|Array}}
{{!}}-
{{!}} '''Base'''* [c,i] {{!!}} {{l/ver/clade/full|p=futilities||InReq}}
{{!}}-
{{!}} '''DbStuff'''* [i,t] {{!!}} {{l/ver/clade/full|p=futilities|Sys\dba\InReq\infmts|DbStuff}}
{{!}}-
{{!}} '''FilePaths'''* [c] {{!!}} [WFe]{{l/ver/clade/full|p=ferreteria|Sys\Data\tplts\FileName|Config}}
{{!}}-
{{!}} '''Kiosk'''* [e] {{!!}} {{l/ver/clade/full|p=futilities|Sys\dba|Kiosk}}
{{!}}-
{{!}} '''InData'''* [t] {{!!}} {{l/ver/clade/full|Sys\dba|InRqData}}
{{!}}-
{{!}} '''QObj'''* [c,i] {{!!}} [WFe]{{l/ver/clade/full|p=ferreteria|Data\Mem\QVar|Obj}}
{{!}}-
{{!}} '''QStr'''* [i] {{!!}} [WFe]{{l/ver/clade/full|p=ferreteria|Data\Mem\QVar|Str}}
{{!}}-
{{!}} '''Self'''* [i] {{!!}} {{l/ver/clade/full|p=futilities|Sys\dba|InReq}}
 
}}
==Purpose==
==Purpose==
Each object encapsulates a given input (request) term. Podling-clades will implement actions and provide functions to access needed values from the input, which is encapsulated by a c{{l/ver/clade|Sys\dba|InRqData}} object which can be retrieved from {{fmt/php/inline|function OAUserInput()}}.
Each object encapsulates a given input (request) term. Podling-clades will implement actions and provide functions to access needed values from the input, which is encapsulated by a c{{l/ver/clade|Sys\dba|InRqData}} object which can be retrieved from {{fmt/php/inline|function OAUserInput()}}.
Line 24: Line 43:
* To access input arguments, get an appropriate c{{l/ver/clade|Sys\dba|InRqData}} object:
* To access input arguments, get an appropriate c{{l/ver/clade|Sys\dba|InRqData}} object:
** {{fmt/php/inline|$this->OAUserInput()}} returns the raw input value strings (split but not parsed), one element for each term in the user input
** {{fmt/php/inline|$this->OAUserInput()}} returns the raw input value strings (split but not parsed), one element for each term in the user input
==Code==
''as of 2025-10-07''
{{fmt/php/block|1=
interface iInReq extends BaseIface, DbStuffIface {
    // OUTPUT
    function ListHosts() : string;
}
trait tInReq {
    use InDataTrait;  // 2025-09-25 might create a conflict
    // ++ OBJECTS: requests ++ //
    protected function QOSchemaMeta() : QObjIface {
        // check to see if we *can* get a Schema object
        $of = FilePaths::Me()->ImportFoNode();
        $oStat = $of->IndexIt();
        echo $oStat->RenderMessages();  // any messages, error or otherwise
        if ($oStat->GetOkay()) {
            $sScSlug = $this->QSSchema()->GetIt();
            $osSchNode = $of->FindSchema($sScSlug); // TODO: possibly this should go in aux\has\tSchema
        } else {
            $osSchNode = QObjClass::AsNew();
        }
        return $osSchNode;
    }
    // -- OBJECTS -- //
    // ++ INPUTS: processing ++ //
    // CEMENT
    protected function ParseInputArgs(array $ar) {
        $nXArgs = count($ar);
        if ($nXArgs > 0) {
            $this->AmHere('TODO 2025-10-04: interpret optional additional arguments');
        }
    }
    protected function SaveAsEngConnName(string $s) {
        $this->OAUserInput()->SetIt(KioskEnum::VAL_CONN->value,$s);
    }
    // ++ INPUTS: parsed/stored ++ //
    protected function QDbConnSlug() : QStrIface {
        return $this->OAUserInput()->QDbConnSlug();
    }
    protected function QSchemaSlug() : QStrIface {
        return $this->OAUserInput()->QSchemaSlug();
    }
    // -- INPUT -- //
}
}}

Revision as of 02:09, 8 October 2025

clade: Sys\dba\InReq
Clade Family

[WFe]RqActor [t]
(base)InReq

InReq

DoExport
DoImport
DoList
DoSetup
DoTest
SetFile
SetFolder
Value

Clade Aliases
Alias Clade
Array* [i] [WFe]Sys\Data\Things\Array
Base* [c,i] \InReq
DbStuff* [i,t] Sys\dba\InReq\infmts\DbStuff
FilePaths* [c] [WFe]Sys\Data\tplts\FileName\Config
Kiosk* [e] Sys\dba\Kiosk
InData* [t] Sys\dba\InRqData
QObj* [c,i] [WFe]Data\Mem\QVar\Obj
QStr* [i] [WFe]Data\Mem\QVar\Str
Self* [i] Sys\dba\InReq
Subpages

Purpose

Each object encapsulates a given input (request) term. Podling-clades will implement actions and provide functions to access needed values from the input, which is encapsulated by a cInRqData object which can be retrieved from function OAUserInput().

To make use of additional user arguments (after the first), InputRq podlings (aka InReq podlings) can implement function ParseInputArgs(array $ar).

Doing Stuff

  • To access input arguments, get an appropriate cInRqData object:
    • $this->OAUserInput() returns the raw input value strings (split but not parsed), one element for each term in the user input

Code

as of 2025-10-07

interface iInReq extends BaseIface, DbStuffIface {
    // OUTPUT
    function ListHosts() : string;
}
trait tInReq {
    use InDataTrait;  // 2025-09-25 might create a conflict

    // ++ OBJECTS: requests ++ //

    protected function QOSchemaMeta() : QObjIface {
        // check to see if we *can* get a Schema object
        $of = FilePaths::Me()->ImportFoNode();
        $oStat = $of->IndexIt();
        echo $oStat->RenderMessages();  // any messages, error or otherwise
        if ($oStat->GetOkay()) {
            $sScSlug = $this->QSSchema()->GetIt();
            $osSchNode = $of->FindSchema($sScSlug); // TODO: possibly this should go in aux\has\tSchema
        } else {
            $osSchNode = QObjClass::AsNew();
        }
        return $osSchNode;
    }

    // -- OBJECTS -- //
    // ++ INPUTS: processing ++ //

    // CEMENT
    protected function ParseInputArgs(array $ar) {
        $nXArgs = count($ar);
        if ($nXArgs > 0) {
            $this->AmHere('TODO 2025-10-04: interpret optional additional arguments');
        }
    }

    protected function SaveAsEngConnName(string $s) {
        $this->OAUserInput()->SetIt(KioskEnum::VAL_CONN->value,$s);
    }

    // ++ INPUTS: parsed/stored ++ //

    protected function QDbConnSlug() : QStrIface {
        return $this->OAUserInput()->QDbConnSlug();
    }
    protected function QSchemaSlug() : QStrIface {
        return $this->OAUserInput()->QSchemaSlug();
    }

    // -- INPUT -- //
}