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

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Events‎ | InputRq
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);
    }