PHP Класс 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.
Наследование: extends TokenizerBase
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
parse_string ( ) : integer Parse a HTML string (attributes)

Описание методов

__construct() публичный Метод

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

parse_all() публичный Метод

Parse full document
public parse_all ( ) : boolean
Результат boolean

parse_asp() публичный Метод

Parse asp tags
public parse_asp ( ) : boolean
Результат boolean

parse_attributes() публичный Метод

Parse attributes (names + value)
public parse_attributes ( ) : boolean
Результат boolean

parse_cdata() публичный Метод

Parse cdata tag
public parse_cdata ( ) : boolean
Результат boolean

parse_comment() публичный Метод

Parse comment tags
public parse_comment ( ) : boolean
Результат boolean

parse_conditional() публичный Метод

Parse conditional tags (+ all conditional tags inside)
public parse_conditional ( ) : boolean
Результат boolean

parse_doctype() публичный Метод

Parse doctype tag
public parse_doctype ( ) : boolean
Результат boolean

parse_php() публичный Метод

Parse php tags
public parse_php ( ) : boolean
Результат boolean

parse_script() публичный Метод

Parse script tags
public parse_script ( ) : boolean
Результат boolean

parse_string() защищенный Метод

Parse a HTML string (attributes)
protected parse_string ( ) : integer
Результат integer

parse_style() публичный Метод

Parse style tags
public parse_style ( ) : boolean
Результат boolean

parse_tag() публичный Метод

Parse tag
public parse_tag ( ) : boolean
Результат boolean

parse_tag_default() публичный Метод

Default callback for tags
public parse_tag_default ( ) : boolean
Результат boolean

parse_text() публичный Метод

Parse text between tags
public parse_text ( )

Описание свойств

$custom_char_map публичное свойство

Map characters to match their tokens
См. также: TokenizerBase::$custom_char_map
public $custom_char_map

$identifiers публичное свойство

Sets HTML identifiers, tags/attributes are considered identifiers
См. также: TokenizerBase::$identifiers
public $identifiers

$status публичное свойство

Status of the parser (tagname, closing tag, etc)
public array $status
Результат array

$tag_map публичное свойство

Callback functions for certain tags
public $tag_map