khanat-opennel-code/code/web/app/app_achievements_admin/class/Dispatcher_trait.php
SirCotare a02851452b #1470 monday's push_all
--HG--
branch : gsoc2012-achievements
2012-06-25 22:00:02 +02:00

30 lines
No EOL
539 B
PHP

<?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);
}
}
?>