|
| __get ($name) |
|
| __set ($name, $value) |
|
| location ($href=NULL) |
|
| baseURI ($href=NULL) |
| get/set baseURI
|
|
| __construct ($html, $idx=true) |
|
| __toString () |
|
| url2abs ($url) |
|
| strlen () |
|
| substr ($start, $length=NULL) |
|
| _info () |
| This method is for debugging only.
|
|
| hasClass ($id, $cl) |
|
| attr ($attr=NULL, $to_str=false) |
|
| is_empty () |
|
| isEmpty () |
|
| isDoc () |
|
| doc () |
|
| find ($sel, $attr=NULL) |
|
| exclude ($sel, $attr=NULL) |
|
| __toString () |
|
| html ($id=NULL) |
|
| outerHtml ($id=NULL) |
|
| text ($id=NULL) |
|
| nodeName ($caseFolding=NULL, $id=NULL) |
|
| pos ($restore=true) |
|
| _children ($ids=NULL, $n=NULL) |
|
| _next ($ids=NULL, $n=0) |
|
| _prev ($ids=NULL, $n=0) |
|
| _all ($ids=NULL) |
|
| _has ($el, $eq=false) |
| $el < $this, with $eq == true -> $el <= $this
|
|
| _filter_contains ($el, $eq=false) |
|
| __get ($name) |
|
| __set ($name, $value) |
|
| __isset ($name) |
|
| __unset ($name) |
|
| count () |
|
| current () |
|
| valid () |
|
| key () |
|
| next () |
|
| prev () |
|
| rewind () |
|
|
static | get_url_base ($url, $array=false) |
|
static | get_url_path ($url) |
|
static | is_url_path ($path) |
|
static | is_abs_path ($path) |
|
static | abs_url ($url, $base) |
|
static | detect_charset ($str) |
|
static | html_normal_pseudoClass ($p) |
|
static | html_selector2struc ($sel) |
|
static | html_parseAttrStr ($str, $case_folding=true, $extended=false) |
|
static | html_attr2str ($attr, $quote='"') |
|
static | parseCSStr ($str, $case_folding=true) |
|
static | CSSArr2Str ($css) |
|
static | str_range ($comp, $pos=0, $len=NULL) |
|
static | array_select ($arr, $keys, $force_null=false) |
|
static | convert_encoding ($a, $to, $from=NULL) |
|
|
static | $del_spaces = false |
|
static | $case_folding = true |
|
static | $autoclose_tags = false |
|
static | $_emptyTags = array('base','meta','link','hr','br','basefont','param','img','area','input','isindex','col') |
|
static | $_specialTags = array('--'=>'--', '[CDATA['=>']]') |
|
static | $_unparsedTags = array('style', 'script') |
|
static | $_index_attribs = array('href', 'src') |
|
static | $_url_attribs = array('href'=>'href', 'src'=>'src') |
|
static | $last_http_result |
|
static | $selected_doc = NULL |
|
static | $_ar_ = array() |
|
static | $_mi_ = PHP_INT_MAX |
|
static | $_nl_ = NULL |
|
static | $_fl_ = false |
|
static | $_tr_ = true |
|
|
| _index_comments_html ($o) |
| Index comment tags position in source HTML.
|
|
| _index_all () |
|
| _get_ctx ($ctx) |
|
| _find ($name, $class=NULL, $attr=NULL, $ctx=NULL, $rec=true) |
|
| _filter ($ids, $name=NULL, $class=NULL, $attr=NULL, $ctx=NULL) |
|
| get_aids_byAttr ($attr, $as_keys=false, $actx=NULL) |
|
| get_aids_byClass ($cl, $as_keys=false, $actx=NULL) |
|
| get_aids_byClassAttr ($cl, $attr, $as_keys=false, $actx=NULL) |
|
| get_ids_byAid ($aid, $sort=true, $has_keys=false) |
|
| get_ids_byAttr ($attr, $sort=true) |
|
| get_ids_byClass ($cl, $sort=true) |
|
| get_ids_byClassAttr ($cl, $attr, $sort=true) |
|
| get_attr_byAid ($aid, $to_str=false) |
|
| get_attr_byId ($id, $attr=NULL, $to_str=false) |
|
| __construct ($doc, $ids, $is_ctx=false) |
|
| _ctx_ids ($ids=NULL) |
|
| _sub_ids ($eq=false) |
|
| _doc_ids ($el, $force_array=true) |
|
| _my_ids ($id=NULL, $keys=false) |
|
| _parent ($ids=NULL, $n=0) |
|
|
| $html = '' |
|
| $tags |
|
| $attrs |
|
| $attribs |
|
| $idx_attr |
|
| $tag_idx |
|
| $attr_idx |
|
| $class_idx |
|
| $o = NULL |
|
| $indexed = false |
|
| $_prop = array() |
|
| $doc |
|
| $ids |
|
| $exc |
|
|
static | $_tagID_first_letter = 'a-zA-Z_' |
|
static | $_tagID_letters = 'a-zA-Z_0-9:\-' |
|
static | $_icharset = 'UTF-8' |
|
|
const | VERSION = '2.0.2' |
|
| $tag_map |
|
static | html_findTagClose ($str, $p) |
|
HTML Parser Class
Definition at line 12 of file HTML_Parser.php.
◆ abs_url()
static duzun\hQuery\HTML_Parser::abs_url |
( |
|
$url, |
|
|
|
$base |
|
) |
| |
|
static |
Given a $url (relative or absolute) and a $base url, returns absolute url for $url.
- Parameters
-
string | $url | - relative or absolute URL |
string | $base | - Base URL for $url |
- Returns
- string absolute URL for $url
Definition at line 228 of file HTML_Parser.php.
◆ get_aids_byAttr()
duzun\hQuery\HTML_Parser::get_aids_byAttr |
( |
|
$attr, |
|
|
|
$as_keys = false , |
|
|
|
$actx = NULL |
|
) |
| |
|
protected |
◆ get_aids_byClass()
duzun\hQuery\HTML_Parser::get_aids_byClass |
( |
|
$cl, |
|
|
|
$as_keys = false , |
|
|
|
$actx = NULL |
|
) |
| |
|
protected |
- Returns
- $as_keys ? [aid => id | [ids]] : [aids]
Definition at line 756 of file HTML_Parser.php.
◆ get_ids_byAid()
duzun\hQuery\HTML_Parser::get_ids_byAid |
( |
|
$aid, |
|
|
|
$sort = true , |
|
|
|
$has_keys = false |
|
) |
| |
|
protected |
$has_keys == true => $aid == [aid=>[ids]] $has_keys == false => $aid == [aids]
Definition at line 797 of file HTML_Parser.php.
◆ hasClass()
duzun\hQuery\HTML_Parser::hasClass |
( |
|
$id, |
|
|
|
$cl |
|
) |
| |
Checks whether $this element/collection has a(ll) class(es).
- Parameters
-
int | array | string | Node | $id | - The context to check |
string | array | $cl | - class(es) to check |
- Returns
- false - no class, 0 - doesn't have any class, true - has class, [id => true]
Definition at line 660 of file HTML_Parser.php.
References duzun\hQuery\find().
◆ is_abs_path()
static duzun\hQuery\HTML_Parser::is_abs_path |
( |
|
$path | ) |
|
|
static |
Check whether $path is an absolute path.
- Parameters
-
string | $path | - a path to check |
- Returns
- bool TRUE if $path is an absolute path, FALSE otherwise
Definition at line 208 of file HTML_Parser.php.
◆ is_url_path()
static duzun\hQuery\HTML_Parser::is_url_path |
( |
|
$path | ) |
|
|
static |
Check whether $path is a valid url.
- Parameters
-
string | $path | - a path to check |
- Returns
- bool TRUE if $path is a valid URL, FALSE otherwise
Definition at line 197 of file HTML_Parser.php.
The documentation for this class was generated from the following file: