mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 16:38:43 +00:00
6a32131dd8
--HG-- branch : gsoc2012-achievements
37 lines
No EOL
632 B
PHP
37 lines
No EOL
632 B
PHP
<?php
|
|
trait Node {
|
|
/*---------------------------
|
|
This trait provides basic functionality common to nodes.
|
|
|
|
Every node has an id, and InDeX and a parent.
|
|
---------------------------*/
|
|
|
|
protected $idx;
|
|
protected $id;
|
|
protected $parent;
|
|
|
|
final function getID() {
|
|
return $this->id;
|
|
}
|
|
|
|
final function getIdx() {
|
|
return $this->idx;
|
|
}
|
|
|
|
final function getParent() {
|
|
return $this->parent;
|
|
}
|
|
|
|
final function setIdx($i) {
|
|
$this->idx = $i;
|
|
}
|
|
|
|
final function setID($id) {
|
|
$this->id = $id;
|
|
}
|
|
|
|
final function setParent($p) {
|
|
$this->parent = $p;
|
|
}
|
|
}
|
|
?>
|