Убрано дублирование классов. Helpers уехали из Core. Классы во внешних директориях переехали к остальным.

This commit is contained in:
2023-08-14 18:15:05 +03:00
parent 81a8161d32
commit 0d2b4aba63
114 changed files with 12919 additions and 13151 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace Helper;
class Table
{
public static function get($rows, $class = '', $fill = false): string
{
$c = '';
$maxRows = sizeof(max($rows));
foreach ($rows as $row) {
if ($fill && sizeof($row) < $maxRows) {
$row = array_merge($row, array_fill(0, $maxRows - sizeof($row), ''));
}
$c .= '<tr><td>' . implode('</td><td>', $row) . '</td></tr>';
}
return (!empty($class) ? "<table class='$class'>" : '<table>') . $c . '</table>' . PHP_EOL;
}
}