Overview

Namespaces

  • Tokamak
    • Dom

Classes

  • Component
  • Document
  • Element
  • HTMLDocument
  • Node
  • Overview
  • Namespace
  • Class

Class Document

Class Document

Tokamak\Dom\Node
Extended by Tokamak\Dom\Document

Direct known subclasses

Tokamak\Dom\HTMLDocument
Abstract
Namespace: Tokamak\Dom
Package: Tokamak\Dom
Located at Dom/Document.php
Methods summary
public
# __construct( array $data = null, array $doctype = null )

Initialize the document by passing it data/state.

Initialize the document by passing it data/state.

Parameters

$data
$doctype
public
# setFormatOutput( boolean $bool )

Set whether the string output should be formatted with newLines.

Set whether the string output should be formatted with newLines.

Parameters

$bool
public Tokamak\Dom\Node
# append( Tokamak\Dom\Node $child )

Append a Node instance to the top-level DOM root.

Append a Node instance to the top-level DOM root.

Parameters

$child
An Element or Component.

Returns

Tokamak\Dom\Node
Returns the child for method-chaining.
public string
# toString( )

Alias for "magic" __toString method.

Alias for "magic" __toString method.

Returns

string
abstract public string
# __toString( )

Render a string representation of the document.

Render a string representation of the document.

Returns

string
Methods inherited from Tokamak\Dom\Node
addDomNode(), appendComponent(), appendElement(), getDom(), getDomNode(), hasDomNodes(), render(), setDom()
Properties summary
public static string $version

The XML version of the document. Not used in HTML5 docs.

The XML version of the document. Not used in HTML5 docs.

# '1.0'
public static string $encoding

The character encoding of the document.

The character encoding of the document.

# 'UTF-8'
protected DOMDocument $dom

The underlying DOMDocument instance over which this library provides an abstraction.

The underlying DOMDocument instance over which this library provides an abstraction.

#
Properties inherited from Tokamak\Dom\Node
$COMPONENT_NAMESPACE, $domNodes
API documentation generated by ApiGen