1: <?php
2: namespace Tokamak\Dom;
3:
4: 5: 6: 7: 8:
9: abstract class HTMLDocument extends Document {
10: public static $doctype = array("html", null, null);
11:
12: public function __construct (array $data = null, array $doctype = null){
13: if(!isset($doctype)){
14: $doctype = static::$doctype;
15: }
16:
17: parent::__construct($data, $doctype);
18: }
19:
20: 21: 22: 23:
24: public function __toString()
25: {
26: return $this->toHTML();
27: }
28: 29: 30: 31:
32: protected function toHTML(){
33: return $this->dom->saveHTML();
34: }
35: }