Ferreteria/v0.6/clade/Sys/Events/InputRq/@fx/WithItemPiece

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Events‎ | InputRq
Revision as of 14:33, 19 November 2025 by Woozle (talk | contribs) (Created page with "{{page/fx}} ==About== * '''General''': {{l/ver/fx|{{SUBPAGENAME}}}} ==Code== ''as of {{fmt/date|2025|11|19}}:'' {{fmt/php/block|1=# protected function WithItemPiece(ItemIface $oItem, PieceIface $oPiece) : void { $this->Item($oItem); if ($oPiece->HasValue()) { $sVal = $oPiece->Value(); $this->ParseInputArgs($oPiece->GetExtras()); } else { // check for default (used if request is present but with no value):...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Code

as of 2025-11-19:

#
    protected function WithItemPiece(ItemIface $oItem, PieceIface $oPiece) : void {
        $this->Item($oItem);
        if ($oPiece->HasValue()) {
            $sVal = $oPiece->Value();
            $this->ParseInputArgs($oPiece->GetExtras());
        } else {
            // check for default (used if request is present but with no value):
            $osDef = $oItem->SDefault(); // TODO: Implement as $this->Attrs()->QryIt('valdef');
            if ($osDef->HasIt()) {
                $sVal = $osDef->GetIt();
            } else {
                $sVal = '';
            }
        }
        $this->ParseInputString($sVal);
    }