IP.Board  3.3.0
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)
 _needsCdata ($str)
 _outsideTagCB ($m)
 _removeCdata ($str)
 _removePreCB ($m)
 _removeScriptCB ($m)
 _removeStyleCB ($m)
 _removeTextareaCB ($m)
 _reservePlace ($content)

Protected Attributes

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

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

Member Function Documentation

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
process ( )

Minify the markeup given in the constructor

Returns:
string

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