Adding del functions for metagen units and tokens
This commit is contained in:
parent
a84718215d
commit
90acee3b62
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue