elements = $elements;
if (!$IDs) {
$keys=array_keys($this->elements);
foreach($this->elements as $k=>$v) {
$this->ids[] = $this->elements[$k]->id;
}
} else {
$this->ids = $IDs;
}
//foreach ($this->ids as $k=>$v) {
//var_dump($this->elements[$k]);
//$this->elements[$k]->id = $v;
//}
}
function __toString() {
return sprintf("
",
$this->first_element,
implode("\n", $this->elements),
$this->last_element
);
}
function set_layout($new,$target="") {
switch ($target) {
case "first":
break;
case "last":
break;
default:
foreach($this->elements as $el) {
$el->set_layout($new);
}
break;
}
}
function set_first($element,$layout="") {
$this->first_element=$element;
if ($layout) {
$this->first_element->set_layout($layout);
}
}
function set_last($element,$layout="") {
$this->last_element=$element;
if ($layout) {
$this->last_element->set_layout($layout);
}
}
}