kernel version 0.1.4
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user