Ferreteria/v0.6/clade/Sys/Data/Engine/Conn/view/VConns: Difference between revisions
Jump to navigation
Jump to search
m (Woozle moved page Ferreteria/v0.6/clade/Sys/Data/Engine/Conn/view/VConn to Ferreteria/v0.6/clade/Sys/Data/Engine/Conn/view/VConns without leaving a redirect: more accurate name) |
No edit summary |
||
| Line 2: | Line 2: | ||
|fam= | |fam= | ||
{{!}} align=right {{!}} <code>{{l/ver/clade|Sys\Data\Things\Array\View|List}}</code> | {{!}} align=right {{!}} <code>{{l/ver/clade|Sys\Data\Things\Array\View|List}}</code> | ||
{{!}} align=center {{!}} ⇒ <code>{{l/ver/clade|Sys\Data\Engine\Conn\view| | {{!}} align=center {{!}} ⇒ <code>{{l/ver/clade|Sys\Data\Engine\Conn\view|VConns}}</code> ⇒ | ||
{{!}} align=left {{!}} ''(none yet)'' | {{!}} align=left {{!}} ''(none yet)'' | ||
| Line 14: | Line 14: | ||
}} | }} | ||
==About== | ==About== | ||
* '''Purpose''': seems to be a viewer for a list of Connections. | * '''Purpose''': seems to be a viewer for a list of Connections. | ||
* '''See also''': {{l/ver/clade|IO\Aspect\view|VConnx}} for singular viewer | |||
==Status== | ==Status== | ||
* '''{{fmt/date|2025|08|18}}''' Not sure if this still works. | * '''{{fmt/date|2025|08|18}}''' Not sure if this still works. | ||
| Line 21: | Line 22: | ||
* '''{{fmt/date|2025|11|29}}''' Commented out because I wanted to see if anything else was still using it. | * '''{{fmt/date|2025|11|29}}''' Commented out because I wanted to see if anything else was still using it. | ||
* '''{{fmt/date|2025|12|03}}''' Apparently [WFe]<code>Sys\Data\Engine\Conn</code> is still using it. Re-enabling (expect there will be broken bits). | * '''{{fmt/date|2025|12|03}}''' Apparently [WFe]<code>Sys\Data\Engine\Conn</code> is still using it. Re-enabling (expect there will be broken bits). | ||
** Moved from [WFe]<code>Sys\Data\aux\Viewer</code> | ** Moved from [WFe]<code>Sys\Data\aux\Viewer</code> ⇒ [WFe]<code>Sys\Data\Engine\Conn\view\VConn</code> | ||
* '''{{fmt/date|2025|12|04}}''' Renamed from <code>VConn</code> ⇒ <code>VConns</code>, to reflect the fact that it's a list. | |||
==Code== | ==Code== | ||
''as of {{fmt/date|2025|12| | ''as of {{fmt/date|2025|12|04}}:'' | ||
{{fmt/php/block|1= | {{fmt/php/block|1= | ||
interface | interface iVConns extends BaseIface {} | ||
class | class cVConns extends BaseClass implements iVConns { | ||
// ++ SETUP ++ // | // ++ SETUP ++ // | ||
Latest revision as of 16:07, 4 December 2025
| ||||||||||||||||||||||||
About
- Purpose: seems to be a viewer for a list of Connections.
- See also: VConnx for singular viewer
Status
History
- 2025-06-04 This may not be using the right structural assumptions anymore.
- 2025-11-29 Commented out because I wanted to see if anything else was still using it.
- 2025-12-03 Apparently [WFe]
Sys\Data\Engine\Connis still using it. Re-enabling (expect there will be broken bits).- Moved from [WFe]
Sys\Data\aux\Viewer⇒ [WFe]Sys\Data\Engine\Conn\view\VConn
- Moved from [WFe]
- 2025-12-04 Renamed from
VConn⇒VConns, to reflect the fact that it's a list.
Code
interface iVConns extends BaseIface {}
class cVConns extends BaseClass implements iVConns {
// ++ SETUP ++ //
public function __construct(SubjIface $oSubj, private SockIface $oSock, private CredIface $oCred, private CnnxIface $oConn) {
parent::__construct($oSubj);
}
protected function OSock() : SockIface { return $this->oSock; }
protected function OCred() : CredIface { return $this->oCred; }
protected function OConn() : CnnxIface { return $this->oConn; }
// -- SETUP -- //
// ++ OUTPUT ++ //
// CEMENT
public function Render() : string {
$oa = $this->OArray();
$n = $oa->Count();
if ($n === 0) {
$sOut = '{no db connections available}'.CRLF;
} else {
$sOut = $this->RenderPopulated();
}
return $sOut;
}
// OVERRIDE
protected function AddTableHeader(TableIface $oTbl) : void {
$oRow = $oTbl->NewRow();
$oRow->IsHeader(TRUE);
$oRow->WithData(['connection name','details']); // header
}
// OVERRIDE
protected function RenderObject(object $oSubj) : string { return $oSubj->DescribeInline(); }
// -- OUTPUT -- //
}