| 1: | <?php
|
| 2: | namespace Sphp\tools{
|
| 3: | class HTMLDOMNode {
|
| 4: | public $nodetype = 3;
|
| 5: | public $tag = 'text';
|
| 6: | public $attr = array();
|
| 7: | public $children = array();
|
| 8: | public $nodes = array();
|
| 9: | public $parent = null;
|
| 10: | public $_a = array();
|
| 11: | public $charpos = 0;
|
| 12: | const HDOM_TYPE_ELEMENT = 1;
|
| 13: | const HDOM_TYPE_COMMENT = 2;
|
| 14: | const HDOM_TYPE_TEXT = 3;
|
| 15: | const HDOM_TYPE_ENDTAG = 4;
|
| 16: | const HDOM_TYPE_ROOT = 5;
|
| 17: | const HDOM_TYPE_UNKNOWN = 6;
|
| 18: | const HDOM_QUOTE_DOUBLE = 0;
|
| 19: | const HDOM_QUOTE_SINGLE = 1;
|
| 20: | const HDOM_QUOTE_NO = 3;
|
| 21: | const HDOM_INFO_BEGIN = 0;
|
| 22: | const HDOM_INFO_END = 1;
|
| 23: | const HDOM_INFO_QUOTE = 2;
|
| 24: | const HDOM_INFO_SPACE = 3;
|
| 25: | const HDOM_INFO_TEXT = 4;
|
| 26: | const HDOM_INFO_INNER = 5;
|
| 27: | const HDOM_INFO_OUTER = 6;
|
| 28: | const HDOM_INFO_ENDSPACE = 7;
|
| 29: | public function getNodetype() {}
|
| 30: | public function getTag() {}
|
| 31: | public function getAttr() {}
|
| 32: | public function getChildren() {}
|
| 33: | public function hasChildren() {}
|
| 34: | public function addChild($node) {}
|
| 35: | public function getNodes() {}
|
| 36: | public function addNode($node) {}
|
| 37: | public function getParent() {}
|
| 38: | public function setNodetype($nodetype) {}
|
| 39: | public function setTag($tag) {}
|
| 40: | public function setAttr($attr) {}
|
| 41: | public function setChildren($children) {}
|
| 42: | public function setNodes($nodes) {}
|
| 43: | public function setParent($parent) {}
|
| 44: | public function isEndTag() {}
|
| 45: | public function isSelfClose() {}
|
| 46: | public function clear() {}
|
| 47: | public function dump($show_attr = true) {}
|
| 48: | public function parent() {}
|
| 49: | public function children($idx = -1) {}
|
| 50: | public function first_child() {}
|
| 51: | public function last_child() {}
|
| 52: | public function next_sibling() {}
|
| 53: | public function prev_sibling() {}
|
| 54: | public function setA($key,$val) {}
|
| 55: | public function setAppendA($key,$val) {}
|
| 56: | public function setAA($key,$val) {}
|
| 57: | public function innertext() {}
|
| 58: | public function outertext() {}
|
| 59: | public function outertext2() {}
|
| 60: | public function text() {}
|
| 61: | public function xmltext() {}
|
| 62: | public function makeup() {}
|
| 63: | public function find($selector, $idx = null) {}
|
| 64: | protected function seek($selector, $ret) {}
|
| 65: | protected function match($exp, $pattern, $value) {}
|
| 66: | protected function parse_selector($selector_string) {}
|
| 67: | |
| 68: | |
| 69: | |
| 70: | |
| 71: |
|
| 72: | public function setInnerHTML($value) {}
|
| 73: | public function getAllAttributes() {}
|
| 74: | public function getAttribute($name) {}
|
| 75: | public function setAttribute($name, $value) {}
|
| 76: | public function hasAttribute($name) {}
|
| 77: | public function removeAttribute($name) {}
|
| 78: | public function getElementById($id) {}
|
| 79: | public function getElementsById($id, $idx = null) {}
|
| 80: | public function getElementByTagName($name) {}
|
| 81: | public function getElementsByTagName($name, $idx = null) {}
|
| 82: | public function parentNode() {}
|
| 83: | public function childNodes($idx = -1) {}
|
| 84: | public function firstChild() {}
|
| 85: | public function lastChild() {}
|
| 86: | public function nextSibling() {}
|
| 87: | public function previousSibling() {}
|
| 88: | }
|
| 89: | }
|
| 90: | |