* zin: add more commands for query.

This commit is contained in:
sunhao
2024-02-28 09:17:17 +08:00
parent ab11c64529
commit 44fc56f686
4 changed files with 43 additions and 32 deletions
+3 -1
View File
@@ -43,6 +43,8 @@ class node implements \JsonSerializable
public ?node $parent = null;
public ?node $rootNode = null;
public props $props;
public array $blocks = array();
@@ -259,7 +261,7 @@ class node implements \JsonSerializable
return $this->props->pick(array_keys(static::definedPropsList()));
}
public function add($item, string $blockName = 'children', bool $prepend = false)
public function add(mixed $item, string $blockName = 'children', bool $prepend = false)
{
if($item === null || is_bool($item)) return;