Adding del functions for metagen units and tokens

This commit is contained in:
Pavel Shevaev 2023-10-23 11:08:48 +03:00
parent a84718215d
commit 90acee3b62
1 changed files with 10 additions and 0 deletions

View File

@ -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;