PHP 클래스 simplehtmldom_1_5\simple_html_dom_node

PaperG - added $tag_start to track the start position of the tag in the total byte index
파일 보기 프로젝트 열기: sunra/php-simple-html-dom-parser

공개 프로퍼티들

프로퍼티 타입 설명
$_ .. for what each element contains.
$attr
$children simple_html_dom_node[]
$nodes
$nodetype
$parent
$tag
$tag_start

공개 메소드들

메소드 설명
__construct ( simple_html_dom $dom )
__destruct ( )
__get ( $name )
__isset ( $name )
__set ( $name, $value )
__toString ( )
__unset ( $name )
appendChild ( $node )
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 ( $echo = true ) Debugging function to dump a single dom node with a bunch of information about it.
find ( string $selector, integer | null $idx = null, boolean $lowercase = false ) : simple_html_dom_node[] | simple_html_dom_node | null find elements by css selector 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 )
get_display_size ( ) : array Function to try a few tricks to determine the displayed size of an img on the page.
hasAttribute ( $name )
hasChildNodes ( )
has_child ( ) verify that node has children
innertext ( ) get dom node's inner html
is_utf8 ( mixed $str ) : boolean Returns true if $string is valid UTF-8 and false otherwise.
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
nodeName ( )
outertext ( ) get dom node's outer text (with tag)
parent ( $parent = null ) If a node is passed in, it will reset the parent of the current node to that one.
parentNode ( )
prev_sibling ( ) returns the previous sibling of node
previousSibling ( )
removeAttribute ( $name )
setAttribute ( $name, $value )
text ( ) get dom node's plain text
xmltext ( )

보호된 메소드들

메소드 설명
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.

메소드 상세

__construct() 공개 메소드

public __construct ( simple_html_dom $dom )
$dom simple_html_dom

__destruct() 공개 메소드

public __destruct ( )

__get() 공개 메소드

public __get ( $name )

__isset() 공개 메소드

public __isset ( $name )

__set() 공개 메소드

public __set ( $name, $value )

__toString() 공개 메소드

public __toString ( )

__unset() 공개 메소드

public __unset ( $name )

appendChild() 공개 메소드

public appendChild ( $node )

childNodes() 공개 메소드

public childNodes ( $idx )

children() 공개 메소드

returns children of node
public children ( $idx )

clear() 공개 메소드

..
public clear ( )

convert_text() 공개 메소드

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() 공개 메소드

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

dump_node() 공개 메소드

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

find() 공개 메소드

find elements by css selector PaperG - added ability for find to lowercase the value of the selector.
public find ( string $selector, integer | null $idx = null, boolean $lowercase = false ) : simple_html_dom_node[] | simple_html_dom_node | null
$selector string
$idx integer | null
$lowercase boolean
리턴 simple_html_dom_node[] | simple_html_dom_node | null

find_ancestor_tag() 공개 메소드

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

firstChild() 공개 메소드

public firstChild ( )

first_child() 공개 메소드

returns the first child of node
public first_child ( )

getAllAttributes() 공개 메소드

camel naming conventions
public getAllAttributes ( )

getAttribute() 공개 메소드

public getAttribute ( $name )

getElementById() 공개 메소드

public getElementById ( $id )

getElementByTagName() 공개 메소드

public getElementByTagName ( $name )

getElementsById() 공개 메소드

public getElementsById ( $id, $idx = null )

getElementsByTagName() 공개 메소드

public getElementsByTagName ( $name, $idx = null )

get_display_size() 공개 메소드

NOTE: This will ONLY work on an IMG tag. Returns FALSE on all other tag types.
저자: John Schlick
public get_display_size ( ) : array
리턴 array an array containing the 'height' and 'width' of the image on the page or -1 if we can't figure it out.

hasAttribute() 공개 메소드

public hasAttribute ( $name )

hasChildNodes() 공개 메소드

public hasChildNodes ( )

has_child() 공개 메소드

verify that node has children
public has_child ( )

innertext() 공개 메소드

get dom node's inner html
public innertext ( )

is_utf8() 정적인 공개 메소드

Returns true if $string is valid UTF-8 and false otherwise.
static public is_utf8 ( mixed $str ) : boolean
$str mixed String to be tested
리턴 boolean

lastChild() 공개 메소드

public lastChild ( )

last_child() 공개 메소드

returns the last child of node
public last_child ( )

makeup() 공개 메소드

build node's text with tag
public makeup ( )

match() 보호된 메소드

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

nextSibling() 공개 메소드

public nextSibling ( )

next_sibling() 공개 메소드

returns the next sibling of node
public next_sibling ( )

nodeName() 공개 메소드

public nodeName ( )

outertext() 공개 메소드

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

parent() 공개 메소드

If a node is passed in, it will reset the parent of the current node to that one.
public parent ( $parent = null )

parentNode() 공개 메소드

public parentNode ( )

parse_selector() 보호된 메소드

protected parse_selector ( $selector_string )

prev_sibling() 공개 메소드

returns the previous sibling of node
public prev_sibling ( )

previousSibling() 공개 메소드

public previousSibling ( )

removeAttribute() 공개 메소드

public removeAttribute ( $name )

seek() 보호된 메소드

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

setAttribute() 공개 메소드

public setAttribute ( $name, $value )

text() 공개 메소드

get dom node's plain text
public text ( )

xmltext() 공개 메소드

public xmltext ( )

프로퍼티 상세

$_ 공개적으로 프로퍼티

.. for what each element contains.
public $_

$attr 공개적으로 프로퍼티

public $attr

$children 공개적으로 프로퍼티

public simple_html_dom_node[],simplehtmldom_1_5 $children
리턴 simple_html_dom_node[]

$nodes 공개적으로 프로퍼티

public $nodes

$nodetype 공개적으로 프로퍼티

public $nodetype

$parent 공개적으로 프로퍼티

public $parent

$tag 공개적으로 프로퍼티

public $tag

$tag_start 공개적으로 프로퍼티

public $tag_start