first gestalt

This commit is contained in:
2025-01-15 15:04:34 +03:00
parent 64dad0aaf9
commit fe2ed9d789
80 changed files with 1139 additions and 2 deletions

View File

@ -2,6 +2,8 @@
namespace kernel;
use kernel\helpers\Debug;
class CgView
{
public string $viewPath = '';
@ -61,6 +63,13 @@ class CgView
private function createContent(string $viewFile, array $data = []): false|string
{
ob_start();
if ($this->varToLayout){
foreach ($this->varToLayout as $key => $datum) {
${"$key"} = $datum;
}
}
$view = $this;
foreach ($data as $key => $datum) {
${"$key"} = $datum;