mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-11 09:49:05 +00:00
a02851452b
--HG-- branch : gsoc2012-achievements
30 lines
No EOL
539 B
PHP
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);
|
|
}
|
|
}
|
|
?>
|