SetClass($class); $this->AddItem($value); } } class CList extends CTag { /* public */ function CList($value=NULL,$class=NULL) { parent::CTag('ul','yes'); $this->tag_end = ''; $this->AddItem($value); $this->SetClass($class); } function PrepareItem($value=NULL,$class=null) { if(!is_null($value)) { $value = new CListItem($value,$class); } return $value; } function AddItem($value,$class=null) { if(is_array($value)) { foreach($value as $el) parent::AddItem($this->PrepareItem($el,$class)); } else { parent::AddItem($this->PrepareItem($value,$class)); } } } ?>