Ferreteria/v0.6/clade/Sys/Events/InputRq/aux/InRqData

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Events‎ | InputRq
Jump to navigation Jump to search
clade: Sys\Events\InputRq\aux\InRqData
Clade Family
AStr InRqData [WFu]InRqData
Clade Aliases
Alias Clade
Base* [c,i] Sys\Data\Things\Array\QStor\AStr
QObj* [c,i] Data\Mem\QVar\Obj
QStr* [c,i] Data\Mem\QVar\Str
Self* [i] Sys\Events\InputRq\aux\InRqData
Subpages

About

  • PURPOSE: auxiliary object for managing per-InputRq settings info

By default, this class breaks up the input-processing into sensible chunks which can be overridden without significantly affecting the overall logic.

Pages

Code

as of 2025-10-16

interface iInRqData extends BaseIface {
    function QADefaults() : QObjIface;
    function FetchItQ(string $sKey) : QStrIface;
}
class cInRqData extends BaseClass implements SelfIface {

    // ++ SETTINGS ++ //

    private $ooDef=NULL;
    public function QADefaults() : QObjIface { return $this->ooDef ?? ($this->ooDef = QObjClass::AsNew()); }

    // -- SETTINGS -- //
    // ++ ACCESS ++ //

    public function FetchItQ(string $sKey) : QStrIface {
        $os = $this->GetItQ($sKey);
        if ($os->HasIt()) {
            // This is a bit of a kluge...
            if ($os->GetIt() === '') {
                $os->ZapIt();
            }
        }
        if (!$os->HasIt()) {
            // value not set locally, so check defaults if available:
            $ooDef = $this->QADefaults();
            if ($ooDef->HasIt()) {
                // we have defaults, so see if they have the value:
                $os = $ooDef->GetIt()->FetchItQ($sKey); // 2025-09-18 may need updating here
            }
        }
        return $os;
    }

    // -- ACCESS -- //

}