class HtmlHelper extends TestDomHelper (View source)

The HtmlHelper class.

Methods

static string
repair(string $html, boolean $use_tidy = true)

Repair HTML. If Tidy not exists, use repair function.

static string
getJSObject(mixed $data = array(), bool $quoteKey = false)

Method to get a JavaScript object notation string from an array

static boolean
isAssociativeArray(array $array)

Method to determine if an array is an associative array.

Details

at line line 28
static string repair(string $html, boolean $use_tidy = true)

Repair HTML. If Tidy not exists, use repair function.

Parameters

string $html The HTML string to repair.
boolean $use_tidy Force tidy or not.

Return Value

string Repaired HTML.

at line line 93
static string getJSObject(mixed $data = array(), bool $quoteKey = false)

Method to get a JavaScript object notation string from an array

Parameters

mixed $data The data to convert to JavaScript object notation
bool $quoteKey Quote json key or not.

Return Value

string JavaScript object notation representation of the array

at line line 165
static boolean isAssociativeArray(array $array)

Method to determine if an array is an associative array.

Parameters

array $array An array to test.

Return Value

boolean True if the array is an associative array.