khanat-opennel-code/code/web/app/app_achievements_admin/class/Dispatcher_trait.php

30 lines
539 B
PHP
Raw Normal View History

<?php
trait Dispatcher {
function insertNode(&$n) {
#MISSING: set this as parent
$n->insert();
$this->nodes[] = $n;
}
function removeNode($id) {#NAMENSKONFLIKT!!
$res = $this->getNode($id);
if($res != null) {
$res->delete_me();
$this->removeNode($res);
}
}
function updateNode($id,$data) {
$res = $this->getNode($id);
if($res != null) {
#MISSING: set new data
#
$res->update();
}
}
function getNode($id) {
return $this->getIdx($id);
}
}
?>