class OutputRules implements RulesInterface (View source)

Generate the output html5 based on element rules.

Constants

NAMESPACE_HTML

Defined in http://www.w3.org/TR/html51/infrastructure.html#html-namespace-0

NAMESPACE_MATHML

NAMESPACE_SVG

NAMESPACE_XLINK

NAMESPACE_XML

NAMESPACE_XMLNS

IM_IN_HTML

IM_IN_SVG

IM_IN_MATHML

DOCTYPE

Methods

__construct( mixed $output, array $options = array())

The class constructor.

addRule( array $rule)

No description

setTraverser( Traverser $traverser)

Register the traverser used in but the rules.

document( DOMDocument $dom)

Write a document element (\DOMDocument).

element( mixed $ele)

Write an element.

text( mixed $ele)

Write a text node.

cdata( mixed $ele)

Write a CDATA node.

comment( mixed $ele)

Write a comment node.

processorInstruction( mixed $ele)

Write a processor instruction.

Details

at line line 160
__construct( mixed $output, array $options = array())

The class constructor.

Note, before the rules can be used a traverser must be registered.

Parameters

mixed $output The output stream to write output to.
array $options An array of options.

at line line 172
addRule( array $rule)

Parameters

array $rule

at line line 177
RulesInterface setTraverser( Traverser $traverser)

Register the traverser used in but the rules.

Note, only one traverser can be used by the rules.

Parameters

Traverser $traverser The traverser used in the rules.

Return Value

RulesInterface $this for the current object.

at line line 184
document( DOMDocument $dom)

Write a document element (\DOMDocument).

Instead of returning the result write it to the output stream ($output) that was passed into the constructor.

Parameters

DOMDocument $dom

at line line 201
element( mixed $ele)

Write an element.

Instead of returning the result write it to the output stream ($output) that was passed into the constructor.

Parameters

mixed $ele

at line line 250
text( mixed $ele)

Write a text node.

Parameters

mixed $ele

at line line 261
cdata( mixed $ele)

Write a CDATA node.

Instead of returning the result write it to the output stream ($output) that was passed into the constructor.

Parameters

mixed $ele

at line line 267
comment( mixed $ele)

Write a comment node.

Instead of returning the result write it to the output stream ($output) that was passed into the constructor.

Parameters

mixed $ele

at line line 274
processorInstruction( mixed $ele)

Write a processor instruction.

To learn about processor instructions see \Masterminds\HTML5\InstructionProcessor

Instead of returning the result write it to the output stream ($output) that was passed into the constructor.

Parameters

mixed $ele