kernel v0.1.4

This commit is contained in:
apuc committed 2025-01-21 16:51:29 +03:00
1 parent b733a49738
commit 2664f7fd78
35 files changed
+1249 -82

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;