From 90acee3b62a7704f2054b534df72cac8053978c0 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Mon, 23 Oct 2023 11:08:48 +0300 Subject: [PATCH] Adding del functions for metagen units and tokens --- metagen.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/metagen.inc.php b/metagen.inc.php index e1ff14b..0d7fd47 100644 --- a/metagen.inc.php +++ b/metagen.inc.php @@ -103,6 +103,11 @@ class mtgMetaInfo $this->units[$unit->object->getMetaId()] = $unit; } + function delUnit(mtgMetaInfoUnit $unit) + { + unset($this->units[$unit->object->getMetaId()]); + } + function getUnits() { return $this->units; @@ -152,6 +157,11 @@ abstract class mtgMetaUnit $this->tokens[$name] = $val; } + function delToken($name) + { + unset($this->tokens[$name]); + } + function getToken($name) { return $this->hasToken($name) ? $this->tokens[$name] : null;