2012-05-25 09:48:56 +00:00
|
|
|
<?php
|
|
|
|
abstract class RenderNodeIterator {
|
2012-05-27 19:08:28 +00:00
|
|
|
protected $nodes = array();
|
2012-05-25 09:48:56 +00:00
|
|
|
|
|
|
|
function getSize() {
|
|
|
|
return sizeof($this->nodes);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getChild($i) {
|
|
|
|
return $this->nodes[$i];
|
|
|
|
}
|
|
|
|
|
|
|
|
function isEmpty() {
|
|
|
|
return (sizeof($this->nodes) == 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
function getChildren() {
|
|
|
|
return $this->nodes;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class AchList extends RenderNodeIterator {
|
2012-05-27 19:08:28 +00:00
|
|
|
protected $child_done = array();
|
|
|
|
protected $child_open = array();
|
2012-05-25 09:48:56 +00:00
|
|
|
|
|
|
|
function getDone() {
|
|
|
|
return $this->child_done;
|
|
|
|
}
|
|
|
|
|
|
|
|
function getOpen() {
|
|
|
|
return $this->child_open;
|
|
|
|
}
|
|
|
|
|
|
|
|
function hasOpen() {
|
|
|
|
return (sizeof($this->child_open) != 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
function hasDone() {
|
|
|
|
return (sizeof($this->child_done) != 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|