Exemplo n.º 1
0
 public function addHeader(array $header)
 {
     if ($this->head != null) {
         logger::getInstance()->doLog(LOG_LEVEL_ASSERT, "added header twice with content " . json_encode($header));
     } else {
         $this->addHead();
     }
     $row = new basenode("th");
     foreach ($header as $item) {
         $rowcontent = new basenode("td");
         $rowcontent->setText($item);
         $row->addChildren($rowcontent);
     }
     if ($this->head instanceof basenode) {
         $this->head->addChildren($row);
     }
 }