simple_html_dom_node
in package
simple html dom node PaperG - added ability for "find" routine to lowercase the value of the selector.
PaperG - added $tag_start to track the start position of the tag in the total byte index
Table of Contents
- $_ : mixed
- $attr : mixed
- $children : mixed
- $nodes : mixed
- $nodetype : mixed
- $parent : mixed
- $tag : mixed
- $tag_start : mixed
- $dom : mixed
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- __isset() : mixed
- __set() : mixed
- __toString() : mixed
- __unset() : mixed
- appendChild() : mixed
- childNodes() : mixed
- children() : mixed
- clear() : mixed
- convert_text() : mixed
- dump() : mixed
- dump_node() : mixed
- find() : mixed
- find_ancestor_tag() : mixed
- first_child() : mixed
- firstChild() : mixed
- get_display_size() : array<string|int, mixed>
- Function to try a few tricks to determine the displayed size of an img on the page.
- getAllAttributes() : mixed
- getAttribute() : mixed
- getElementById() : mixed
- getElementByTagName() : mixed
- getElementsById() : mixed
- getElementsByTagName() : mixed
- has_child() : mixed
- hasAttribute() : mixed
- hasChildNodes() : mixed
- innertext() : mixed
- is_utf8() : bool
- Returns true if $string is valid UTF-8 and false otherwise.
- last_child() : mixed
- lastChild() : mixed
- makeup() : mixed
- next_sibling() : mixed
- nextSibling() : mixed
- nodeName() : mixed
- outertext() : mixed
- parent() : mixed
- parentNode() : mixed
- prev_sibling() : mixed
- previousSibling() : mixed
- removeAttribute() : mixed
- setAttribute() : mixed
- text() : mixed
- xmltext() : mixed
- match() : mixed
- parse_selector() : mixed
- seek() : mixed
Properties
$_
public
mixed
$_
= array()
$attr
public
mixed
$attr
= array()
$children
public
mixed
$children
= array()
$nodes
public
mixed
$nodes
= array()
$nodetype
public
mixed
$nodetype
= HDOM_TYPE_TEXT
$parent
public
mixed
$parent
= null
$tag
public
mixed
$tag
= 'text'
$tag_start
public
mixed
$tag_start
= 0
$dom
private
mixed
$dom
= null
Methods
__construct()
public
__construct(mixed $dom) : mixed
Parameters
- $dom : mixed
Return values
mixed —__destruct()
public
__destruct() : mixed
Return values
mixed —__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__isset()
public
__isset(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__set()
public
__set(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —__unset()
public
__unset(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —appendChild()
public
appendChild(mixed $node) : mixed
Parameters
- $node : mixed
Return values
mixed —childNodes()
public
childNodes([mixed $idx = -1 ]) : mixed
Parameters
- $idx : mixed = -1
Return values
mixed —children()
public
children([mixed $idx = -1 ]) : mixed
Parameters
- $idx : mixed = -1
Return values
mixed —clear()
public
clear() : mixed
Return values
mixed —convert_text()
public
convert_text(mixed $text) : mixed
Parameters
- $text : mixed
Return values
mixed —dump()
public
dump([mixed $show_attr = true ], mixed $deep) : mixed
Parameters
- $show_attr : mixed = true
- $deep : mixed
Return values
mixed —dump_node()
public
dump_node([mixed $echo = true ]) : mixed
Parameters
- $echo : mixed = true
Return values
mixed —find()
public
find(mixed $selector[, mixed $idx = null ][, mixed $lowercase = false ]) : mixed
Parameters
- $selector : mixed
- $idx : mixed = null
- $lowercase : mixed = false
Return values
mixed —find_ancestor_tag()
public
find_ancestor_tag(mixed $tag) : mixed
Parameters
- $tag : mixed
Return values
mixed —first_child()
public
first_child() : mixed
Return values
mixed —firstChild()
public
firstChild() : mixed
Return values
mixed —get_display_size()
Function to try a few tricks to determine the displayed size of an img on the page.
public
get_display_size() : array<string|int, mixed>
NOTE: This will ONLY work on an IMG tag. Returns FALSE on all other tag types.
Tags
Return values
array<string|int, mixed> —an array containing the 'height' and 'width' of the image on the page or -1 if we can't figure it out.
getAllAttributes()
public
getAllAttributes() : mixed
Return values
mixed —getAttribute()
public
getAttribute(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —getElementById()
public
getElementById(mixed $id) : mixed
Parameters
- $id : mixed
Return values
mixed —getElementByTagName()
public
getElementByTagName(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —getElementsById()
public
getElementsById(mixed $id[, mixed $idx = null ]) : mixed
Parameters
- $id : mixed
- $idx : mixed = null
Return values
mixed —getElementsByTagName()
public
getElementsByTagName(mixed $name[, mixed $idx = null ]) : mixed
Parameters
- $name : mixed
- $idx : mixed = null
Return values
mixed —has_child()
public
has_child() : mixed
Return values
mixed —hasAttribute()
public
hasAttribute(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —hasChildNodes()
public
hasChildNodes() : mixed
Return values
mixed —innertext()
public
innertext() : mixed
Return values
mixed —is_utf8()
Returns true if $string is valid UTF-8 and false otherwise.
public
static is_utf8(mixed $str) : bool
Parameters
- $str : mixed
-
String to be tested
Return values
bool —last_child()
public
last_child() : mixed
Return values
mixed —lastChild()
public
lastChild() : mixed
Return values
mixed —makeup()
public
makeup() : mixed
Return values
mixed —next_sibling()
public
next_sibling() : mixed
Return values
mixed —nextSibling()
public
nextSibling() : mixed
Return values
mixed —nodeName()
public
nodeName() : mixed
Return values
mixed —outertext()
public
outertext() : mixed
Return values
mixed —parent()
public
parent([mixed $parent = null ]) : mixed
Parameters
- $parent : mixed = null
Return values
mixed —parentNode()
public
parentNode() : mixed
Return values
mixed —prev_sibling()
public
prev_sibling() : mixed
Return values
mixed —previousSibling()
public
previousSibling() : mixed
Return values
mixed —removeAttribute()
public
removeAttribute(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —setAttribute()
public
setAttribute(mixed $name, mixed $value) : mixed
Parameters
- $name : mixed
- $value : mixed
Return values
mixed —text()
public
text() : mixed
Return values
mixed —xmltext()
public
xmltext() : mixed
Return values
mixed —match()
protected
match(mixed $exp, mixed $pattern, mixed $value) : mixed
Parameters
- $exp : mixed
- $pattern : mixed
- $value : mixed
Return values
mixed —parse_selector()
protected
parse_selector(mixed $selector_string) : mixed
Parameters
- $selector_string : mixed
Return values
mixed —seek()
protected
seek(mixed $selector, mixed &$ret[, mixed $lowercase = false ]) : mixed
Parameters
- $selector : mixed
- $ret : mixed
- $lowercase : mixed = false