khanat-opennel-code/code/web/app/app_achievements/class/Node_trait.php

37 lines
632 B
PHP
Raw Normal View History

<?php
trait Node {
2012-07-02 16:55:13 +00:00
/*---------------------------
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;
}
}
?>