PHP Class Essence\Dom\Document\Native

Inheritance: extends Essence\Dom\Document
ファイルを表示 Open project: benjamminf/craft-embedded-assets

Protected Properties

Property Type Description
$_Document DOMDocument DOM document.

Public Methods

Method Description
__construct ( $html ) {@inheritDoc}
tags ( $name, Closure $filter = null ) {@inheritDoc}

Protected Methods

Method Description
_fixCharset ( ) If necessary, fixes the given HTML's charset to work with the current version of Libxml (used by DOMDocument).
_loadDocument ( ) Builds a DOMDocument from the HTML source.

Method Details

__construct() public method

{@inheritDoc}
public __construct ( $html )

_fixCharset() protected method

Older versions of Libxml only recognizes: and not the new HTML5 form: with the result that parsed strings can have funny characters.
See also: http://www.glenscott.co.uk/blog/html5-character-encodings-and-domdocument-loadhtml-and-loadhtmlfile
See also: https://github.com/glenscott/dom-document-charset/blob/master/DOMDocumentCharset.php
protected _fixCharset ( )

_loadDocument() protected method

Builds a DOMDocument from the HTML source.
protected _loadDocument ( )

tags() public method

{@inheritDoc}
public tags ( $name, Closure $filter = null )
$filter Closure

Property Details

$_Document protected_oe property

DOM document.
protected DOMDocument $_Document
return DOMDocument