* @package zin * @version $Id * @link https://www.zentao.net */ namespace zin; require_once __DIR__ . DS . 'node.class.php'; require_once __DIR__ . DS . 'directive.class.php'; require_once __DIR__ . DS . 'context.func.php'; class htm extends node { public function addToBlock(string $name, mixed $child, bool $prepend = false) { if(is_string($child)) { $child = (object)array('html' => $child); } return parent::addToBlock($name, $child, $prepend); } } function html(mixed ...$codes): htm { return new htm(...$codes); } function rawContent(): htm { context()->rawContentCalled = true; return h::comment('{{RAW_CONTENT}}'); } function hookContent(): htm { context()->hookContentCalled = true; return h::comment('{{HOOK_CONTENT}}'); }