[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/include/simplehtmldom/ -> simple_html_dom.php (summary)

Website: http://sourceforge.net/projects/simplehtmldom/ Acknowledge: Jose Solorzano (https://sourceforge.net/projects/php-html/) Contributions by: Yousuke Kumakura (Attribute filters) Vadim Voituk (Negative indexes supports of "find" method) Antcs (Constructor with automatically load contents either text or file/url) all affected sections have comments starting with "PaperG"

Author: S.C. Chen <[email protected]>
Author: John Schlick
Author: Rus Carroll
Version: 1.5 ($Rev: 196 $)
File Size: 1721 lines (65 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

simple_html_dom_node:: (48 methods):
  __construct()
  __destruct()
  __toString()
  clear()
  dump()
  dump_node()
  parent()
  has_child()
  children()
  first_child()
  last_child()
  next_sibling()
  prev_sibling()
  find_ancestor_tag()
  innertext()
  outertext()
  text()
  xmltext()
  makeup()
  find()
  seek()
  match()
  parse_selector()
  __get()
  __set()
  __isset()
  __unset()
  convert_text()
  is_utf8()
  get_display_size()
  getAllAttributes()
  getAttribute()
  setAttribute()
  hasAttribute()
  removeAttribute()
  getElementById()
  getElementsById()
  getElementByTagName()
  getElementsByTagName()
  parentNode()
  childNodes()
  firstChild()
  lastChild()
  nextSibling()
  previousSibling()
  hasChildNodes()
  nodeName()
  appendChild()

simple_html_dom:: (37 methods):
  __construct()
  __destruct()
  load()
  load_file()
  set_callback()
  remove_callback()
  save()
  find()
  clear()
  dump()
  prepare()
  parse()
  parse_charset()
  read_tag()
  parse_attr()
  link_nodes()
  as_text_node()
  skip()
  copy_skip()
  copy_until()
  copy_until_char()
  copy_until_char_escape()
  remove_noise()
  restore_noise()
  search_noise()
  __toString()
  __get()
  childNodes()
  firstChild()
  lastChild()
  createElement()
  createTextNode()
  getElementById()
  getElementsById()
  getElementByTagName()
  getElementsByTagName()
  loadFile()

Defines 37 functions

  file_get_html()
  str_get_html()
  dump_html_tree()

Class: simple_html_dom_node  - X-Ref

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

__construct($dom)   X-Ref
No description

__destruct()   X-Ref
No description

__toString()   X-Ref
No description

clear()   X-Ref
No description

dump($show_attr=true, $deep=0)   X-Ref
No description

dump_node($echo=true)   X-Ref
No description

parent($parent=null)   X-Ref
No description

has_child()   X-Ref
No description

children($idx=-1)   X-Ref
No description

first_child()   X-Ref
No description

last_child()   X-Ref
No description

next_sibling()   X-Ref
No description

prev_sibling()   X-Ref
No description

find_ancestor_tag($tag)   X-Ref
No description

innertext()   X-Ref
No description

outertext()   X-Ref
No description

text()   X-Ref
No description

xmltext()   X-Ref
No description

makeup()   X-Ref
No description

find($selector, $idx=null, $lowercase=false)   X-Ref
No description

seek($selector, &$ret, $lowercase=false)   X-Ref
No description

match($exp, $pattern, $value)   X-Ref
No description

parse_selector($selector_string)   X-Ref
No description

__get($name)   X-Ref
No description

__set($name, $value)   X-Ref
No description

__isset($name)   X-Ref
No description

__unset($name)   X-Ref
No description

convert_text($text)   X-Ref
No description

is_utf8($str)   X-Ref
Returns true if $string is valid UTF-8 and false otherwise.

param: mixed $str String to be tested
return: boolean

get_display_size()   X-Ref
Function to try a few tricks to determine the displayed size of an img on the page.
NOTE: This will ONLY work on an IMG tag. Returns FALSE on all other tag types.

author: John Schlick
return: array an array containing the 'height' and 'width' of the image on the page or -1 if we can't figure it out.

getAllAttributes()   X-Ref
No description

getAttribute($name)   X-Ref
No description

setAttribute($name, $value)   X-Ref
No description

hasAttribute($name)   X-Ref
No description

removeAttribute($name)   X-Ref
No description

getElementById($id)   X-Ref
No description

getElementsById($id, $idx=null)   X-Ref
No description

getElementByTagName($name)   X-Ref
No description

getElementsByTagName($name, $idx=null)   X-Ref
No description

parentNode()   X-Ref
No description

childNodes($idx=-1)   X-Ref
No description

firstChild()   X-Ref
No description

lastChild()   X-Ref
No description

nextSibling()   X-Ref
No description

previousSibling()   X-Ref
No description

hasChildNodes()   X-Ref
No description

nodeName()   X-Ref
No description

appendChild($node)   X-Ref
No description

Class: simple_html_dom  - X-Ref

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.

__construct($str=null, $lowercase=true, $forceTagsClosed=true, $target_charset=DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)   X-Ref
No description

__destruct()   X-Ref
No description

load($str, $lowercase=true, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)   X-Ref
No description

load_file()   X-Ref
No description

set_callback($function_name)   X-Ref
No description

remove_callback()   X-Ref
No description

save($filepath='')   X-Ref
No description

find($selector, $idx=null, $lowercase=false)   X-Ref
No description

clear()   X-Ref
No description

dump($show_attr=true)   X-Ref
No description

prepare($str, $lowercase=true, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)   X-Ref
No description

parse()   X-Ref
No description

parse_charset()   X-Ref
No description

read_tag()   X-Ref
No description

parse_attr($node, $name, &$space)   X-Ref
No description

link_nodes(&$node, $is_child)   X-Ref
No description

as_text_node($tag)   X-Ref
No description

skip($chars)   X-Ref
No description

copy_skip($chars)   X-Ref
No description

copy_until($chars)   X-Ref
No description

copy_until_char($char)   X-Ref
No description

copy_until_char_escape($char)   X-Ref
No description

remove_noise($pattern, $remove_tag=false)   X-Ref
No description

restore_noise($text)   X-Ref
No description

search_noise($text)   X-Ref
No description

__toString()   X-Ref
No description

__get($name)   X-Ref
No description

childNodes($idx=-1)   X-Ref
No description

firstChild()   X-Ref
No description

lastChild()   X-Ref
No description

createElement($name, $value=null)   X-Ref
No description

createTextNode($value)   X-Ref
No description

getElementById($id)   X-Ref
No description

getElementsById($id, $idx=null)   X-Ref
No description

getElementByTagName($name)   X-Ref
No description

getElementsByTagName($name, $idx=-1)   X-Ref
No description

loadFile()   X-Ref
No description

Functions
Functions that are not part of a class:

file_get_html($url, $use_include_path = false, $context=null, $offset = -1, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)   X-Ref
No description

str_get_html($str, $lowercase=true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)   X-Ref
No description

dump_html_tree($node, $show_attr=true, $deep=0)   X-Ref
No description



Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1