Ferreteria/v0.6/clade/IO/Aspect/Connx/Runner/Local/@fx/DoCommand/@removed

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | IO‎ | Aspect‎ | Connx‎ | Runner‎ | Local‎ | @fx/DoCommand
Jump to navigation Jump to search
Removed Code

2026-02-22

This version of the function was removed on 2026-02-02 before re-namespacing from \Process\ to \Runner\:

#
    // 2026-02-02 I *think* this is identical to the version above. (2/22: meaning the function code in use as of that date)
    // DOCS: https://wooz.dev/Ferreteria/v0.6/clade/IO/Aspect/Connx/Process/Local/@fx/DoCommand
    public function DoCommand(CLineIface $o) : CommOpIface {
        #echo $this->WhoCalledMe();
        $this->OCommand($o);
        $oActOpen = $this->Open();
        $oActComm = $this->ItWentLike();
        $oActComm->Clear();
        echo "ItWent class: ".get_class($oActComm).CRLF;

        $ofLogIO = self::LogFile()->InOut();
        $doOBuff = $this->QRecver()->HasIt();
        if ($doOBuff) $oRecver = $this->QRecver()->GetIt();

        $sData = NULL;
        $this->OnBefore();
        if ($oActOpen->GetOkay()) {
            $rProc = $this->rProc;
            $oSrce = $this->OAPipes()->SrceStream();
            $doLoop = TRUE;
            while ($doLoop) {
                $aStat = proc_get_status($rProc);
                $isGoing = $aStat['running'];

                if ($isGoing) {
                    $oRes = $oSrce->PullBytes(self::IBUFF_SIZE);
                    $sRecd = $oRes->QData()->GetIt();
                    if ($doOBuff) {
                        $oRecver->PushBytes($sRecd);
                        // TODO: check for write-errors
                    } else {
                        $sData .= $sRecd;
                    }
                    $ofLogIO->WriteEntry("RECD: [$sRecd]");

                    $this->OnChange();
                }

                $doLoop = $isGoing;
            }
        }
        $this->OnAfter();
        $this->Shut();
        $oActProc = $this->OResult();
        $oActProc->QData()->SetItNz($sData);
        $oActProc->SetOkay(is_string($sData));
        return $oActComm;
    }