kernel to v0.1.4 update

This commit is contained in:
stasbilay02 committed 2025-01-21 16:56:10 +03:00
1 parent dc84874d16
commit 74b8f2e719
38 files changed
+1334 -91

No files matched your search

+9
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;