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

From Woozle Writes Code
Jump to navigation Jump to search
clade: Sys\Data\Engine\endpt\Server
Clade Family
Server MyMar
Clade Aliases
Alias Clade
Base* [ca,i] IO\Aspect\Connx
ServerIface IO\Aspect\aux\endpt\Server
CredsIface IO\Aspect\Creds
DoorIface IO\Aspect\Entry
SelfIface Sys\Data\Engine\endpt\Server
Subpages

About

  • Purpose: base class for connecting to a database engine (sending commands and/or opening the connection)
  • Parallel: Client

Pages

Code

as of 2026-01-30 (revisions still in progress):

interface iServer extends BaseIface, ServerIface {
    // OBJECTS
    function OCred(?CredsIface $o=NULL) : CredsIface;
}
abstract class caServer extends BaseClass implements SelfIface {

    // ++ CONFIG ++ //

    static protected function RosterClass() : string { return RostClass::class; }  // OVERRIDE

    // -- CONFIG -- //
    // ++ OBJECTS ++ //

    private $oCreds=NULL;
    public function OCred(?CredsIface $o=NULL) : CredsIface { return is_null($o) ? $this->oCreds : ($this->oCreds = $o); }

    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 -- //
}