PHP Class pQuery\HtmlParserBase

Functionality can be extended by overriding functions or adjusting the tag map. Document may contain small errors, the parser will try to recover and resume parsing.
Inheritance: extends TokenizerBase
Afficher le fichier Open project: tburry/pquery

Méthodes publiques

Свойство Type Description
$custom_char_map Map characters to match their tokens
$identifiers Sets HTML identifiers, tags/attributes are considered identifiers
$status array Status of the parser (tagname, closing tag, etc)
$tag_map Callback functions for certain tags

Méthodes publiques

Méthode Description
__construct ( $doc = '', $pos )
parse_all ( ) : boolean Parse full document
parse_asp ( ) : boolean Parse asp tags
parse_attributes ( ) : boolean Parse attributes (names + value)
parse_cdata ( ) : boolean Parse cdata tag
parse_comment ( ) : boolean Parse comment tags
parse_conditional ( ) : boolean Parse conditional tags (+ all conditional tags inside)
parse_doctype ( ) : boolean Parse doctype tag
parse_php ( ) : boolean Parse php tags
parse_script ( ) : boolean Parse script tags
parse_style ( ) : boolean Parse style tags
parse_tag ( ) : boolean Parse tag
parse_tag_default ( ) : boolean Default callback for tags
parse_text ( ) Parse text between tags

Méthodes protégées

Méthode Description
parse_string ( ) : integer Parse a HTML string (attributes)

Method Details

__construct() public méthode

public __construct ( $doc = '', $pos )

parse_all() public méthode

Parse full document
public parse_all ( ) : boolean
Résultat boolean

parse_asp() public méthode

Parse asp tags
public parse_asp ( ) : boolean
Résultat boolean

parse_attributes() public méthode

Parse attributes (names + value)
public parse_attributes ( ) : boolean
Résultat boolean

parse_cdata() public méthode

Parse cdata tag
public parse_cdata ( ) : boolean
Résultat boolean

parse_comment() public méthode

Parse comment tags
public parse_comment ( ) : boolean
Résultat boolean

parse_conditional() public méthode

Parse conditional tags (+ all conditional tags inside)
public parse_conditional ( ) : boolean
Résultat boolean

parse_doctype() public méthode

Parse doctype tag
public parse_doctype ( ) : boolean
Résultat boolean

parse_php() public méthode

Parse php tags
public parse_php ( ) : boolean
Résultat boolean

parse_script() public méthode

Parse script tags
public parse_script ( ) : boolean
Résultat boolean

parse_string() protected méthode

Parse a HTML string (attributes)
protected parse_string ( ) : integer
Résultat integer

parse_style() public méthode

Parse style tags
public parse_style ( ) : boolean
Résultat boolean

parse_tag() public méthode

Parse tag
public parse_tag ( ) : boolean
Résultat boolean

parse_tag_default() public méthode

Default callback for tags
public parse_tag_default ( ) : boolean
Résultat boolean

parse_text() public méthode

Parse text between tags
public parse_text ( )

Property Details

$custom_char_map public_oe property

Map characters to match their tokens
See also: TokenizerBase::$custom_char_map
public $custom_char_map

$identifiers public_oe property

Sets HTML identifiers, tags/attributes are considered identifiers
See also: TokenizerBase::$identifiers
public $identifiers

$status public_oe property

Status of the parser (tagname, closing tag, etc)
public array $status
Résultat array

$tag_map public_oe property

Callback functions for certain tags
public $tag_map