Свойство | Тип | Описание | |
---|---|---|---|
$document | DOMDocument | This may be needed to export an element as HTML | |
$html | string | HTML fragment | |
$links | array | List of URLs in the document | |
$list_stack | array | -1 represents an unordered list, while all other integers represent the current index of the ordered list | |
$text | string | Textual representation of the HTML |
Метод | Описание | |
---|---|---|
__construct ( string $html ) | Constructor | |
convert ( ) : string | Convert HTML into a textual representation | |
silence_errors ( integer $num, string $str ) | No-op error handler for libxml |
Метод | Описание | |
---|---|---|
blockquote ( DOMElement $element ) : string | Parse blockquote elements into a string | |
generate_links ( ) | ||
get_text ( DOMNode $node ) : string | Convert a node to text | |
heading ( DOMElement $element ) : string | Parse heading elements into a string | |
indent ( string $text ) : string | Indent a section of text | |
parse_children ( DOMNode $list ) : string | Parse a node's children | |
parse_element ( DOMElement $element ) : string | Parse an element into text | |
preprocess ( string $html ) : string | Preprocess HTML | |
table ( DOMElement $element ) : string | Parse table elements into a string | |
table_row ( DOMElement $element ) : array | Parse a table row element | |
table_section ( DOMElement $element ) : array | Parse a table section element | |
wrap ( string $str ) : string | Wrap a string to a certain number of characters |
public __construct ( string $html ) | ||
$html | string | HTML fragment to convert |
protected blockquote ( DOMElement $element ) : string | ||
$element | DOMElement | Blockquote element |
Результат | string | Text representation |
protected parse_children ( DOMNode $list ) : string | ||
$list | DOMNode | Node to parse |
Результат | string | Text representation of the node's children |
protected parse_element ( DOMElement $element ) : string | ||
$element | DOMElement | Element to parse |
Результат | string | Text representation of the element |
protected preprocess ( string $html ) : string | ||
$html | string | HTML fragment |
Результат | string | Processed HTML document |
public static silence_errors ( integer $num, string $str ) | ||
$num | integer | Error type |
$str | string | Error message |
protected table_section ( DOMElement $element ) : array | ||
$element | DOMElement | THEAD or TBODY element |
Результат | array | Rows in the section |
protected DOMDocument $document | ||
Результат | DOMDocument |
protected array $list_stack | ||
Результат | array |
protected string $text | ||
Результат | string |