Ferreteria/v0.6/clade/Sys/Data/Engine/Conn/view/VConns: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Data‎ | Engine‎ | Conn‎ | view
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 {{!}} &rArr; <code>{{l/ver/clade|Sys\Data\Engine\Conn\view|VConn}}</code> &rArr;
{{!}} align=center {{!}} &rArr; <code>{{l/ver/clade|Sys\Data\Engine\Conn\view|VConns}}</code> &rArr;
{{!}} 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> -> [WFe]<code>Sys\Data\Engine\Conn\view\VConn</code>
** Moved from [WFe]<code>Sys\Data\aux\Viewer</code> &rArr; [WFe]<code>Sys\Data\Engine\Conn\view\VConn</code>
* '''{{fmt/date|2025|12|04}}''' Renamed from <code>VConn</code> &rArr; <code>VConns</code>, to reflect the fact that it's a list.
==Code==
==Code==
''as of {{fmt/date|2025|12|03}}:''
''as of {{fmt/date|2025|12|04}}:''
{{fmt/php/block|1=
{{fmt/php/block|1=
interface iVConn extends BaseIface {}
interface iVConns extends BaseIface {}
class cVConn extends BaseClass implements iVConn {
class cVConns extends BaseClass implements iVConns {


     // ++ SETUP ++ //
     // ++ SETUP ++ //

Latest revision as of 16:07, 4 December 2025

clade: Sys\Data\Engine\Conn\view\VConns
Clade Family
List VConns (none yet)
Clade Aliases
Alias Clade
Base* [c,i] Sys\Data\Things\Array\View\List
CnnxIface IO\Aspect\Connx
CredIface IO\Aspect\Creds
SockIface IO\Aspect\Socket
SubjIface Aux\StandardBase
TableIface IO\O\Data\Element\Branch\grid\Table
Subpages

About

  • Purpose: seems to be a viewer for a list of Connections.
  • See also: VConnx for singular viewer

Status

  • 2025-08-18 Not sure if this still works.

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\Conn is 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
  • 2025-12-04 Renamed from VConnVConns, to reflect the fact that it's a list.

Code

as of 2025-12-04:

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