Ferreteria/v0.6/clade/Sys/Data/Xfer/Info/Card/@code/removed

From WoozleCodes
Jump to navigation Jump to search
Removed Code

Commented out 2025-07-08:

#
    // ++ SETUP ++ //

    // 2025-07-08 The base array type should be handling this.
    static public function FromArray(array $ar) : self {
        $oThis = new static;
        $oThis->WithArray($ar);
        return $oThis;
    }

Commented out 2025-05-03:

#
    // ++ OBJECT ++ //

    // 2025-05-03 Wait. This should be where we make the Card into a Fields Array, yeah?
    private $oFlds = NULL;
    public function OAData() : ArrayIface { return $this->oFlds ?? ($this->oFlds = $this->OADataNew()); }
    protected function OADataNew() : ArrayIface { return ArrayClass::AsNew(); }

    // -- OBJECT -- //
    // ++ DIAGS ++ //

    // 2025-05-03 This should be in a Debugger.
    public function DumpList() : string {
        $oScrn = self::Screen();
        $ar = $this->OAData()->GetAll();
        $sc = get_called_class();
        $sOut = "Fields in $sc:"
          .$oScrn->OpenList()
          ;
        foreach ($ar as $sKey => $v) {
            if (is_a($v,QVarIface::class)) {
                $os = $v;
                if ($os->HasIt()) {
                    $sVal = $os->GetIt();
                    $sShow = $oScrn->MakeList($sVal);
                } else {
                    $sShow = $oScrn->ItalIt('(empty)');
                }
                $scVar = get_class($os);
                $sLine = "($scVar): $sShow";
            } else {
                $sLine = ': '.$oScrn->MakeList(csTypesFx::DumpLine($v));
            }
            $sOut .= $oScrn->ListItem($sKey.' '.$sLine);
        }
        $sOut .= $oScrn->ShutList();
        return $sOut;
    }

    // -- DIAGS -- //