Ferreteria/v0.6/clade/Sys/Data/Engine/Conn/@removed: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=={{fmt/date|2025|06|06}}== Old version of code that supported Oper the old way: {{fmt/php/block|1= // ++ 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 -- // }} =={{fmt/date|2025|06|03}}== Commented out on 2025-05-28: {{fmt/php/block|1= // SHOR...") |
(No difference)
|
Latest revision as of 02:21, 15 October 2025
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);
}