PHP Class simple_html_dom_node, vanilla

ファイルを表示 Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$_
$attr
$children
$nodes
$nodetype
$parent
$tag
$tag_start

Public Methods

Method Description
__construct ( $dom )
__destruct ( )
__get ( $name )
__isset ( $name )
__set ( $name, $value )
__toString ( )
__unset ( $name )
childNodes ( $idx )
children ( $idx ) returns children of node
clear ( ) clean up memory due to php5 circular references memory leak.
convert_text ( $text ) PaperG - Function to convert the text from one character set to another if the two sets are not the same.
dump ( $show_attr = true, $deep ) dump node's tree
dump_node ( ) Debugging function to dump a single dom node with a bunch of information about it.
find ( $selector, $idx = null, $lowercase = false ) PaperG - added ability for find to lowercase the value of the selector.
find_ancestor_tag ( $tag ) function to locate a specific ancestor tag in the path to the root.
firstChild ( )
first_child ( ) returns the first child of node
getAllAttributes ( ) camel naming conventions
getAttribute ( $name )
getElementById ( $id )
getElementByTagName ( $name )
getElementsById ( $id, $idx = null )
getElementsByTagName ( $name, $idx = null )
hasAttribute ( $name )
innertext ( ) get dom node's inner html
is_utf8 ( $string )
lastChild ( )
last_child ( ) returns the last child of node
makeup ( ) build node's text with tag
nextSibling ( )
next_sibling ( ) returns the next sibling of node
outertext ( ) get dom node's outer text (with tag)
parent ( ) returns the parent of node
parentNode ( )
prev_sibling ( ) returns the previous sibling of node
previousSibling ( )
removeAttribute ( $name )
setAttribute ( $name, $value )
text ( ) get dom node's plain text
xmltext ( )

Protected Methods

Method Description
match ( $exp, $pattern, $value )
parse_selector ( $selector_string )
seek ( $selector, &$ret, $lowercase = false ) PaperG - added parameter to allow for case insensitive testing of the value of a selector.

Method Details

__construct() public method

public __construct ( $dom )

__destruct() public method

public __destruct ( )

__get() public method

public __get ( $name )

__isset() public method

public __isset ( $name )

__set() public method

public __set ( $name, $value )

__toString() public method

public __toString ( )

__unset() public method

public __unset ( $name )

childNodes() public method

public childNodes ( $idx )

children() public method

returns children of node
public children ( $idx )

clear() public method

..
public clear ( )

convert_text() public method

PaperG - Function to convert the text from one character set to another if the two sets are not the same.
public convert_text ( $text )

dump() public method

dump node's tree
public dump ( $show_attr = true, $deep )

dump_node() public method

Debugging function to dump a single dom node with a bunch of information about it.
public dump_node ( )

find() public method

PaperG - added ability for find to lowercase the value of the selector.
public find ( $selector, $idx = null, $lowercase = false )

find_ancestor_tag() public method

function to locate a specific ancestor tag in the path to the root.
public find_ancestor_tag ( $tag )

firstChild() public method

public firstChild ( )

first_child() public method

returns the first child of node
public first_child ( )

getAllAttributes() public method

camel naming conventions
public getAllAttributes ( )

getAttribute() public method

public getAttribute ( $name )

getElementById() public method

public getElementById ( $id )

getElementByTagName() public method

public getElementByTagName ( $name )

getElementsById() public method

public getElementsById ( $id, $idx = null )

getElementsByTagName() public method

public getElementsByTagName ( $name, $idx = null )

hasAttribute() public method

public hasAttribute ( $name )

innertext() public method

get dom node's inner html
public innertext ( )

is_utf8() public method

public is_utf8 ( $string )

lastChild() public method

public lastChild ( )

last_child() public method

returns the last child of node
public last_child ( )

makeup() public method

build node's text with tag
public makeup ( )

match() protected method

protected match ( $exp, $pattern, $value )

nextSibling() public method

public nextSibling ( )

next_sibling() public method

returns the next sibling of node
public next_sibling ( )

outertext() public method

get dom node's outer text (with tag)
public outertext ( )

parent() public method

returns the parent of node
public parent ( )

parentNode() public method

public parentNode ( )

parse_selector() protected method

protected parse_selector ( $selector_string )

prev_sibling() public method

returns the previous sibling of node
public prev_sibling ( )

previousSibling() public method

public previousSibling ( )

removeAttribute() public method

public removeAttribute ( $name )

seek() protected method

PaperG - added parameter to allow for case insensitive testing of the value of a selector.
protected seek ( $selector, &$ret, $lowercase = false )

setAttribute() public method

public setAttribute ( $name, $value )

text() public method

get dom node's plain text
public text ( )

xmltext() public method

public xmltext ( )

Property Details

$_ public_oe property

public $_

$attr public_oe property

public $attr

$children public_oe property

public $children

$nodes public_oe property

public $nodes

$nodetype public_oe property

public $nodetype

$parent public_oe property

public $parent

$tag public_oe property

public $tag

$tag_start public_oe property

public $tag_start