mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-30 07:35:59 +00:00
c888a5249e
--HG-- branch : gsoc2012-achievements
32 lines
No EOL
546 B
PHP
32 lines
No EOL
546 B
PHP
<?php
|
|
abstract class Node {
|
|
/*---------------------------
|
|
This class provides basic functionality common to nodes.
|
|
|
|
Every node has an id and a parent.
|
|
---------------------------*/
|
|
|
|
protected $id;
|
|
protected $parent;
|
|
|
|
function Node() {
|
|
// dummy constructor
|
|
}
|
|
|
|
final function getID() {
|
|
return $this->id;
|
|
}
|
|
|
|
final function getParent() {
|
|
return $this->parent;
|
|
}
|
|
|
|
final function setID($id) {
|
|
$this->id = $id;
|
|
}
|
|
|
|
final function setParent($p) {
|
|
$this->parent = $p;
|
|
}
|
|
}
|
|
?>
|