MicroFrameWork/kernel/Widget.php
2024-11-19 13:41:13 +03:00

34 lines
510 B
PHP

<?php
namespace kernel;
class Widget
{
protected CgView $cgView;
protected array $data;
public function __construct(array $data = [])
{
$this->cgView = new CgView();
$this->cgView->viewPath = KERNEL_DIR . "/views/widgets";
$this->data = $data;
$this->init();
}
public function run()
{
}
public static function create(array $data = []): Widget
{
return new static($data);
}
protected function init()
{
}
}