Moodle  2.2.1
http://www.collinsharper.com
Minify_HTML Class Reference

Public Member Functions

 __construct ($html, $options=array())
 process ()

Static Public Member Functions

static minify ($html, $options=array())

Protected Member Functions

 _commentCB ($m)
 _reservePlace ($content)
 _outsideTagCB ($m)
 _removePreCB ($m)
 _removeTextareaCB ($m)
 _removeStyleCB ($m)
 _removeScriptCB ($m)
 _removeCdata ($str)
 _needsCdata ($str)

Protected Attributes

 $_isXhtml = null
 $_replacementHash = null
 $_placeholders = array()
 $_cssMinifier = null
 $_jsMinifier = null

Detailed Description

Definition at line 19 of file HTML.php.


Constructor & Destructor Documentation

__construct ( html,
options = array() 
)

Create a minifier object

Parameters:
string$html
array$options'cssMinifier' : (optional) callback function to process content of STYLE elements.

'jsMinifier' : (optional) callback function to process content of SCRIPT elements. Note: the type attribute is ignored.

'xhtml' : (optional boolean) should content be treated as XHTML1.0? If unset, minify will sniff for an XHTML doctype.

Returns:
null

Definition at line 63 of file HTML.php.


Member Function Documentation

_commentCB ( m) [protected]

Definition at line 150 of file HTML.php.

_needsCdata ( str) [protected]

Definition at line 241 of file HTML.php.

Here is the caller graph for this function:

_outsideTagCB ( m) [protected]

Definition at line 170 of file HTML.php.

_removeCdata ( str) [protected]

Definition at line 234 of file HTML.php.

Here is the caller graph for this function:

_removePreCB ( m) [protected]

Definition at line 175 of file HTML.php.

Here is the call graph for this function:

_removeScriptCB ( m) [protected]

Definition at line 207 of file HTML.php.

Here is the call graph for this function:

_removeStyleCB ( m) [protected]

Definition at line 185 of file HTML.php.

Here is the call graph for this function:

_removeTextareaCB ( m) [protected]

Definition at line 180 of file HTML.php.

Here is the call graph for this function:

_reservePlace ( content) [protected]

Definition at line 157 of file HTML.php.

Here is the caller graph for this function:

static minify ( html,
options = array() 
) [static]

"Minify" an HTML page

Parameters:
string$html
array$options'cssMinifier' : (optional) callback function to process content of STYLE elements.

'jsMinifier' : (optional) callback function to process content of SCRIPT elements. Note: the type attribute is ignored.

'xhtml' : (optional boolean) should content be treated as XHTML1.0? If unset, minify will sniff for an XHTML doctype.

Returns:
string

Definition at line 39 of file HTML.php.

process ( )

Minify the markeup given in the constructor

Returns:
string

Definition at line 83 of file HTML.php.


Field Documentation

$_cssMinifier = null [protected]

Definition at line 167 of file HTML.php.

$_isXhtml = null [protected]

Definition at line 164 of file HTML.php.

$_jsMinifier = null [protected]

Definition at line 168 of file HTML.php.

$_placeholders = array() [protected]

Definition at line 166 of file HTML.php.

$_replacementHash = null [protected]

Definition at line 165 of file HTML.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations