Domovoy API

node_fn.php

Table of Contents

Functions

raw()  : RawNode
Create a raw HTML node that bypasses escaping.
doctype()  : RawNode
Create a DOCTYPE declaration node.
fragment()  : FragmentNode
Create a fragment node that groups children without producing its own HTML tag.

Functions

raw()

Create a raw HTML node that bypasses escaping.

raw(string $html) : RawNode
Parameters
$html : string

Raw HTML string (not escaped — caller is responsible for safety)

Return values
RawNode

doctype()

Create a DOCTYPE declaration node.

doctype([string $type = 'html' ]) : RawNode
Parameters
$type : string = 'html'

Document type (defaults to 'html' for HTML5)

Return values
RawNode

fragment()

Create a fragment node that groups children without producing its own HTML tag.

fragment(Node|int|string|float|Closure|null ...$children) : FragmentNode

String and numeric children are automatically wrapped in TextNode with escaping. Closure children are invoked and their return values used as nodes. Null children are silently ignored.

Parameters
$children : Node|int|string|float|Closure|null
Return values
FragmentNode

        
On this page

Search results