Documentation

Coder
in package

Table of Contents

Methods

checkConsistentHtml()  : bool
Determine whether an HTML snippet remains consistent (through an decode/encode loop).
encode()  : string
Encode a phpQueryObject as HTML.
recode()  : string
Parse an HTML snippet and re-encode is as HTML.
cleanup()  : mixed
cleanupAttribute()  : string
Angular is not as strict about special characters inside html attributes as the xhtml spec.

Methods

checkConsistentHtml()

Determine whether an HTML snippet remains consistent (through an decode/encode loop).

public checkConsistentHtml(string $html) : bool

Note: Variations in whitespace are permitted.

Parameters
$html : string
Return values
bool

encode()

Encode a phpQueryObject as HTML.

public encode(phpQueryObject $doc) : string
Parameters
$doc : phpQueryObject
Return values
string

HTML

recode()

Parse an HTML snippet and re-encode is as HTML.

public recode(string $html) : string

This is useful for detecting cases where the parser or encoder have quirks/bugs.

Parameters
$html : string
Return values
string

cleanup()

protected cleanup(mixed $html) : mixed
Parameters
$html : mixed

cleanupAttribute()

Angular is not as strict about special characters inside html attributes as the xhtml spec.

protected cleanupAttribute(mixed $matches) : string

This unescapes everything that angular expects to be unescaped.

Parameters
$matches : mixed
Return values
string

        
On this page

Search results