class TreeBuildingRules

Handles special-case rules for the DOM tree builder.

Many tags have special rules that need to be accomodated on an individual basis. This class handles those rules.

See section 8.1.2.4 of the spec.

Methods

__construct( DOMDocument $doc)

Build a new rules engine.

hasRules($tagname)

Returns true if the given tagname has special processing rules.

evaluate($new, $current)

Evaluate the rule for the current tag name.

Details

at line line 41
__construct( DOMDocument $doc)

Build a new rules engine.

Parameters

DOMDocument $doc The DOM document to use for evaluation and modification.

at line line 49
hasRules($tagname)

Returns true if the given tagname has special processing rules.

Parameters

$tagname

at line line 61
DOMElement evaluate($new, $current)

Evaluate the rule for the current tag name.

This may modify the existing DOM.

Parameters

$new
$current

Return Value

DOMElement The new Current DOM element.