PHP Class simple_html_dom_node, vanilla

Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Свойство Type Description
$_
$attr
$children
$nodes
$nodetype
$parent
$tag
$tag_start

Méthodes publiques

Méthode 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 ( )

Méthodes protégées

Méthode 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 méthode

public __construct ( $dom )

__destruct() public méthode

public __destruct ( )

__get() public méthode

public __get ( $name )

__isset() public méthode

public __isset ( $name )

__set() public méthode

public __set ( $name, $value )

__toString() public méthode

public __toString ( )

__unset() public méthode

public __unset ( $name )

childNodes() public méthode

public childNodes ( $idx )

children() public méthode

returns children of node
public children ( $idx )

clear() public méthode

..
public clear ( )

convert_text() public méthode

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 méthode

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

dump_node() public méthode

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

find() public méthode

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

find_ancestor_tag() public méthode

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

firstChild() public méthode

public firstChild ( )

first_child() public méthode

returns the first child of node
public first_child ( )

getAllAttributes() public méthode

camel naming conventions
public getAllAttributes ( )

getAttribute() public méthode

public getAttribute ( $name )

getElementById() public méthode

public getElementById ( $id )

getElementByTagName() public méthode

public getElementByTagName ( $name )

getElementsById() public méthode

public getElementsById ( $id, $idx = null )

getElementsByTagName() public méthode

public getElementsByTagName ( $name, $idx = null )

hasAttribute() public méthode

public hasAttribute ( $name )

innertext() public méthode

get dom node's inner html
public innertext ( )

is_utf8() public méthode

public is_utf8 ( $string )

lastChild() public méthode

public lastChild ( )

last_child() public méthode

returns the last child of node
public last_child ( )

makeup() public méthode

build node's text with tag
public makeup ( )

match() protected méthode

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

nextSibling() public méthode

public nextSibling ( )

next_sibling() public méthode

returns the next sibling of node
public next_sibling ( )

outertext() public méthode

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

parent() public méthode

returns the parent of node
public parent ( )

parentNode() public méthode

public parentNode ( )

parse_selector() protected méthode

protected parse_selector ( $selector_string )

prev_sibling() public méthode

returns the previous sibling of node
public prev_sibling ( )

previousSibling() public méthode

public previousSibling ( )

removeAttribute() public méthode

public removeAttribute ( $name )

seek() protected méthode

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

setAttribute() public méthode

public setAttribute ( $name, $value )

text() public méthode

get dom node's plain text
public text ( )

xmltext() public méthode

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