class DomFormatter (View source)

The AbstractFormatter class.

This class based on https://github.com/gajus/dindent to help use test Dom code.

Constants

ELEMENT_TYPE_BLOCK

ELEMENT_TYPE_INLINE

MATCH_INDENT_NO

MATCH_INDENT_DECREASE

MATCH_INDENT_INCREASE

MATCH_DISCARD

Methods

static DomFormatter
getInstance()

getInstance

static void
setInstance(DomFormatter $instance)

Method to set property instance

static string
format(string $buffer)

format

__construct(array $options = array())

Constructor.

string
indent(string $input)

indent

string
doIndent(string $input)

Format Dom.

array
getLog()

Debugging utility. Get log for the last indent operation.

Details

at line line 56
static DomFormatter getInstance()

getInstance

Return Value

DomFormatter

at line line 73
static void setInstance(DomFormatter $instance)

Method to set property instance

Parameters

DomFormatter $instance

Return Value

void

at line line 85
static string format(string $buffer)

format

Parameters

string $buffer

Return Value

string Formatted Html string.

at line line 95
__construct(array $options = array())

Constructor.

Parameters

array $options

at line line 115
string indent(string $input)

indent

Parameters

string $input

Return Value

string

at line line 133
string doIndent(string $input)

Format Dom.

Parameters

string $input Dom input.

Return Value

string Indented Dom.

at line line 268
array getLog()

Debugging utility. Get log for the last indent operation.

Return Value

array