Ferreteria/v0.6/clade/Sys/Data/Engine/aux/ActionRq/Admin/@code/rmv/2026/05/23

From WoozleCodes
Jump to navigation Jump to search
Code Removed on 2026-05-23
2026/05/22 2026/05/23 2026/05/24

moved to Apps\dba\InReq

#
    // ++ OUTPUT: UI ++ //

    public function RenderHostsList() : string {

        $oScrn = self::Screen();

        $oaDBs = CableAdmin::ObjectRoster();

        $nDBs = $oaDBs->Count();
        if ($nDBs > 0) {
            $oTable = $oScrn->NewTable();
            $sS = ($nDBs == 1) ? '' : 's';
            $sOut = $oScrn->InfoIt($nDBs)." available DB connection$sS:".CRLF;
            $oHdr = $oTable->RowFromData(['name','specs']);
            $oHdr->IsHeader(TRUE);
            $oaDBs->RewindMe();
            foreach ($oaDBs->GetVals() as $sKey => $oConn) {
                $sVal = (is_null($oConn) ? '(BUG: missing!)' : $oConn->DescribeInline());
                $arRow = [$sKey,$sVal];
                $oTable->RowFromData($arRow);
            }
            $sOut .= $oTable->Render();
        } else {
            $sOut = 'No database connections are defined yet.'.CRLF;
        }
        return $sOut;
    }

    // -- OUTPUT -- //