Пример #1
0
 /**
  * Creates the table element, along with its head, foot, & body
  *
  * @param string $col ...    Any number of strings to create columns from
  */
 public function __construct()
 {
     parent::__construct('table');
     (new \DOMDocument('1.0', 'UTF-8'))->appendChild($this);
     $this->_headers = array_filter(func_get_args(), 'is_string');
     $this->_headers = array_map('strtolower', $this->_headers);
     $this->_getEmptyRow();
     $this->_thead = $this->appendChild(new THead());
     $this->_tfoot = $this->appendChild(new TFoot());
     $this->_tbody = $this->appendChild(new TBody());
     $this->_thead->build($this->_headers);
     $this->_tfoot->build($this->_headers);
 }