Add messagebox, bugfixes

This commit is contained in:
2024-10-02 00:53:11 +02:00
parent 24f569070f
commit f23c378020
6 changed files with 239 additions and 5 deletions

View File

@@ -15,6 +15,15 @@ class ObjectNode extends Node implements CollapsibleNode
$this->properties[$key] = $value;
}
public function rename(string $key, string $newKey)
{
$renamed = [];
foreach ($this->properties as $k=>$v) {
$renamed[($k==$key)?$newKey:$k] = $v;
}
$this->properties = $renamed;
}
public function unset(string $key)
{
unset($this->properties[$key]);