simple_html_dom
    
            
            in package
            
        
    
    
    
simple html dom parser Paperg - in the find routine: allow us to specify that we want case insensitive testing of the value of the selector.
Paperg - change $size from protected to public so we can easily access it Paperg - added ForceTagsClosed in the constructor which tells us whether we trust the html or not. Default is to NOT trust it.
Table of Contents
Properties
- $_charset : mixed
- $_target_charset : mixed
- $callback : mixed
- $default_span_text : mixed
- $lowercase : mixed
- $nodes : mixed
- $original_size : mixed
- $root : mixed
- $size : mixed
- $block_tags : mixed
- $char : mixed
- $cursor : mixed
- $default_br_text : mixed
- $doc : mixed
- $noise : mixed
- $optional_closing_tags : mixed
- $parent : mixed
- $pos : mixed
- $self_closing_tags : mixed
- $token_attr : mixed
- $token_blank : mixed
- $token_equal : mixed
- $token_slash : mixed
Methods
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- __toString() : mixed
- childNodes() : mixed
- clear() : mixed
- createElement() : mixed
- createTextNode() : mixed
- dump() : mixed
- find() : mixed
- firstChild() : mixed
- getElementById() : mixed
- getElementByTagName() : mixed
- getElementsById() : mixed
- getElementsByTagName() : mixed
- lastChild() : mixed
- load() : mixed
- load_file() : mixed
- loadFile() : mixed
- remove_callback() : mixed
- restore_noise() : mixed
- save() : mixed
- search_noise() : mixed
- set_callback() : mixed
- as_text_node() : mixed
- copy_skip() : mixed
- copy_until() : mixed
- copy_until_char() : mixed
- copy_until_char_escape() : mixed
- link_nodes() : mixed
- parse() : mixed
- parse_attr() : mixed
- parse_charset() : mixed
- prepare() : mixed
- read_tag() : mixed
- remove_noise() : mixed
- skip() : mixed
Properties
$_charset
    public
        mixed
    $_charset
     = ''
    
    
    
    
$_target_charset
    public
        mixed
    $_target_charset
     = ''
    
    
    
    
$callback
    public
        mixed
    $callback
     = null
    
    
    
    
$default_span_text
    public
        mixed
    $default_span_text
     = ""
    
    
    
    
$lowercase
    public
        mixed
    $lowercase
     = false
    
    
    
    
$nodes
    public
        mixed
    $nodes
     = array()
    
    
    
    
$original_size
    public
        mixed
    $original_size
    
    
    
    
    
$root
    public
        mixed
    $root
     = null
    
    
    
    
$size
    public
        mixed
    $size
    
    
    
    
    
$block_tags
    protected
        mixed
    $block_tags
     = array('root' => 1, 'body' => 1, 'form' => 1, 'div' => 1, 'span' => 1, 'table' => 1)
    
    
    
    
$char
    protected
        mixed
    $char
    
    
    
    
    
$cursor
    protected
        mixed
    $cursor
    
    
    
    
    
$default_br_text
    protected
        mixed
    $default_br_text
     = ""
    
    
    
    
$doc
    protected
        mixed
    $doc
    
    
    
    
    
$noise
    protected
        mixed
    $noise
     = array()
    
    
    
    
$optional_closing_tags
    protected
        mixed
    $optional_closing_tags
     = array('tr' => array('tr' => 1, 'td' => 1, 'th' => 1), 'th' => array('th' => 1), 'td' => array('td' => 1), 'li' => array('li' => 1), 'dt' => array('dt' => 1, 'dd' => 1), 'dd' => array('dd' => 1, 'dt' => 1), 'dl' => array('dd' => 1, 'dt' => 1), 'p' => array('p' => 1), 'nobr' => array('nobr' => 1), 'b' => array('b' => 1), 'option' => array('option' => 1))
    
    
    
    
$parent
    protected
        mixed
    $parent
    
    
    
    
    
$pos
    protected
        mixed
    $pos
    
    
    
    
    
$self_closing_tags
    protected
        mixed
    $self_closing_tags
     = array('img' => 1, 'br' => 1, 'input' => 1, 'meta' => 1, 'link' => 1, 'hr' => 1, 'base' => 1, 'embed' => 1, 'spacer' => 1)
    
    
    
    
$token_attr
    protected
        mixed
    $token_attr
     = ' >'
    
    
    
    
$token_blank
    protected
        mixed
    $token_blank
     = " \t\r\n"
    
    
    
    
$token_equal
    protected
        mixed
    $token_equal
     = ' =/>'
    
    
    
    
$token_slash
    protected
        mixed
    $token_slash
     = " />\r\n\t"
    
    
    
    
Methods
__construct()
    public
                    __construct([mixed $str = null ][, mixed $lowercase = true ][, mixed $forceTagsClosed = true ][, mixed $target_charset = DEFAULT_TARGET_CHARSET ][, mixed $stripRN = true ][, mixed $defaultBRText = DEFAULT_BR_TEXT ][, mixed $defaultSpanText = DEFAULT_SPAN_TEXT ]) : mixed
    Parameters
- $str : mixed = null
- $lowercase : mixed = true
- $forceTagsClosed : mixed = true
- $target_charset : mixed = DEFAULT_TARGET_CHARSET
- $stripRN : mixed = true
- $defaultBRText : mixed = DEFAULT_BR_TEXT
- $defaultSpanText : mixed = DEFAULT_SPAN_TEXT
__destruct()
    public
                    __destruct() : mixed
    __get()
    public
                    __get(mixed $name) : mixed
    Parameters
- $name : mixed
__toString()
    public
                    __toString() : mixed
    childNodes()
    public
                    childNodes([mixed $idx = -1 ]) : mixed
    Parameters
- $idx : mixed = -1
clear()
    public
                    clear() : mixed
    createElement()
    public
                    createElement(mixed $name[, mixed $value = null ]) : mixed
    Parameters
- $name : mixed
- $value : mixed = null
createTextNode()
    public
                    createTextNode(mixed $value) : mixed
    Parameters
- $value : mixed
dump()
    public
                    dump([mixed $show_attr = true ]) : mixed
    Parameters
- $show_attr : mixed = true
find()
    public
                    find(mixed $selector[, mixed $idx = null ][, mixed $lowercase = false ]) : mixed
    Parameters
- $selector : mixed
- $idx : mixed = null
- $lowercase : mixed = false
firstChild()
    public
                    firstChild() : mixed
    getElementById()
    public
                    getElementById(mixed $id) : mixed
    Parameters
- $id : mixed
getElementByTagName()
    public
                    getElementByTagName(mixed $name) : mixed
    Parameters
- $name : mixed
getElementsById()
    public
                    getElementsById(mixed $id[, mixed $idx = null ]) : mixed
    Parameters
- $id : mixed
- $idx : mixed = null
getElementsByTagName()
    public
                    getElementsByTagName(mixed $name[, mixed $idx = -1 ]) : mixed
    Parameters
- $name : mixed
- $idx : mixed = -1
lastChild()
    public
                    lastChild() : mixed
    load()
    public
                    load(mixed $str[, mixed $lowercase = true ][, mixed $stripRN = true ][, mixed $defaultBRText = DEFAULT_BR_TEXT ][, mixed $defaultSpanText = DEFAULT_SPAN_TEXT ]) : mixed
    Parameters
- $str : mixed
- $lowercase : mixed = true
- $stripRN : mixed = true
- $defaultBRText : mixed = DEFAULT_BR_TEXT
- $defaultSpanText : mixed = DEFAULT_SPAN_TEXT
load_file()
    public
                    load_file() : mixed
    loadFile()
    public
                    loadFile() : mixed
    remove_callback()
    public
                    remove_callback() : mixed
    restore_noise()
    public
                    restore_noise(mixed $text) : mixed
    Parameters
- $text : mixed
save()
    public
                    save([mixed $filepath = '' ]) : mixed
    Parameters
- $filepath : mixed = ''
search_noise()
    public
                    search_noise(mixed $text) : mixed
    Parameters
- $text : mixed
set_callback()
    public
                    set_callback(mixed $function_name) : mixed
    Parameters
- $function_name : mixed
as_text_node()
    protected
                    as_text_node(mixed $tag) : mixed
    Parameters
- $tag : mixed
copy_skip()
    protected
                    copy_skip(mixed $chars) : mixed
    Parameters
- $chars : mixed
copy_until()
    protected
                    copy_until(mixed $chars) : mixed
    Parameters
- $chars : mixed
copy_until_char()
    protected
                    copy_until_char(mixed $char) : mixed
    Parameters
- $char : mixed
copy_until_char_escape()
    protected
                    copy_until_char_escape(mixed $char) : mixed
    Parameters
- $char : mixed
link_nodes()
    protected
                    link_nodes(mixed &$node, mixed $is_child) : mixed
    Parameters
- $node : mixed
- $is_child : mixed
parse()
    protected
                    parse() : mixed
    parse_attr()
    protected
                    parse_attr(mixed $node, mixed $name, mixed &$space) : mixed
    Parameters
- $node : mixed
- $name : mixed
- $space : mixed
parse_charset()
    protected
                    parse_charset() : mixed
    prepare()
    protected
                    prepare(mixed $str[, mixed $lowercase = true ][, mixed $stripRN = true ][, mixed $defaultBRText = DEFAULT_BR_TEXT ][, mixed $defaultSpanText = DEFAULT_SPAN_TEXT ]) : mixed
    Parameters
- $str : mixed
- $lowercase : mixed = true
- $stripRN : mixed = true
- $defaultBRText : mixed = DEFAULT_BR_TEXT
- $defaultSpanText : mixed = DEFAULT_SPAN_TEXT
read_tag()
    protected
                    read_tag() : mixed
    remove_noise()
    protected
                    remove_noise(mixed $pattern[, mixed $remove_tag = false ]) : mixed
    Parameters
- $pattern : mixed
- $remove_tag : mixed = false
skip()
    protected
                    skip(mixed $chars) : mixed
    Parameters
- $chars : mixed