Ferreteria/v0.6/clade/Sys/Data/Engine/endpt/Server/@removed

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Data‎ | Engine‎ | endpt/Server
Jump to navigation Jump to search

2026-02-01

Removed 2026-01-31:

#
    // ++ OBJECTS ++ //

    //* 2026-01-31 implemented in Door
    private $oCreds=NULL;
    public function OCred(?CredsIface $o=NULL) : CredsIface { return is_null($o) ? $this->oCreds : ($this->oCreds = $o); }
    //*/

    //* 2026-01-31 wrong name, should be OClient() -- if actually needed.
    private $oOper=NULL;
    public function OOper() : OperIface { return $this->oOper ?? ($this->oOper = $this->OOperNew()); }
    protected function OOperNew() : OperIface {
        $scOper = $this->OperClass();
        $oOper = $scOper::FromConn($this);
        return $oOper;
    }
    //*/

    // -- OBJECTS -- //

2026-01-26

  • 2026/01/26: preserving it as-was before major reworking

2025-06-06

Old version of code that supported Oper the old way:

#
    // ++ SETUP ++ //

    public function __construct(string $sSlug, private SockIface $oSock, private OperIface $oOper) {
        $this->WithSlug($sSlug);
        $oOper->WithConn($this);
    }
    public function OOper() : OperIface { return $this->oOper; }

    // -- SETUP -- //

2025-06-03

Commented out on 2025-05-28:

#
    // SHORTCUT
    // 2025-05-28 call OConnx()
    public function Connx() : ConnxIface {
      echo $this->OSocket()->ReflectThis()->Report(); die();
      return $this->OSocket()->QOConnx()->GetIt(); }

    // -- OBJECTS -- //
    // ++ UI ++ //

    // 2025-05-28 Is this required? Should be in Viewer().
    public function DescribeInline() : string {
        $sCreds = $this->Creds()->DescribeInline();
        $sConnx = $this->Connx()->DescribeInline();
        #$sUser = $this->UserString();
        #$sHost = $this->HostString();
        #$osShell = $this->QShell();
        #$sShell = $osShell->HasIt() ? $osShell->GetIt()->DescribeInline() : '';
        #$sOut = "$sUser @ $sHost$sShell";
        $sOut = $sCreds . self::Screen()->GreenIt(' via ') . $sConnx;
        return $sOut;
    }

    // -- UI -- //

2025-06-01

Commented out 2025-05-28 and earlier:

// 2025-05-28 Needs Connx
    static public function FromSocket(string $sSlug, SockIface $o) : iDbConn {
        $oThis = new static;
        $oThis->WithSlug($sSlug);
        $oThis->WithSocket($o);
        return $oThis;
    }

    // 2025-05-27 old
    static public function FromSlugCredsConnx(string $sSlug, CredsIface $oCreds, ConnxIface $oConnx) : iDbConn {
        $oThis = new static;
        $oThis->WithSlug($sSlug);
        $oThis->WithCreds($oCreds);
        $oThis->WithConnx($oConnx);
        return $oThis;
    }

    // ++ SETUP: dynamic ++ //

    // 2025-05-28 implemented differently now
    private $oSock;
    public function WithSocket(SockIface $o) : void { $this->oSock = $o; }
    protected function OSocket() : SockIface { return $this->oSock; }

    // OVERRIDE
    protected function WithSlug(string $sSlug) {
        parent::WithSlug($sSlug);
        #echo $this->ReflectThis()->Report();
    }

    private $oCreds; protected function WithCreds(CredsIface $o) { $this->oCreds = $o; }
    private $oConnx; protected function WithConnx(ConnxIface $o) { $this->oConnx = $o; }

    // -- SETUP -- //

2024-12-14

De-constructifying; here's the old constructor:

public function __construct(string $sSlug, private CredsIface $oCreds, private ConnxIface $oConnx) {
        parent::__construct($sSlug);
    }