\TinyMCE_Compressor

This class combines and compresses the TinyMCE core, plugins, themes and language packs into one disk cached gzipped request. It improves the loading speed of TinyMCE dramatically but still provides dynamic initialization.

Example of direct usage: require_once("../jscripts/tiny_mce/tiny_mce_gzip.php");

// Renders script tag with compressed scripts TinyMCE_Compressor::renderTag(array( "url" => "../jscripts/tiny_mce/tiny_mce_gzip.php", "plugins" => "pagebreak,style", "themes" => "advanced", "languages" => "en" ));

Summary

Methods
Properties
Constants
__construct()
addFile()
handleRequest()
renderTag()
getParam()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(mixed||string|int  settings = array()) : 

Constructs a new compressor instance.

Parameters

mixed||string|int settings

Name/value array with non-default settings for the compressor instance.

Returns

addFile()

addFile(  file) : 

Adds a file to the concatenation/compression process.

Parameters

file

Path to the file to include in the compressed package/output.

Returns

handleRequest()

handleRequest() : 

Handles the incoming HTTP request and sends back a compressed script depending on settings and client support.

Returns

renderTag()

renderTag(mixed||string|int  tagSettings,   return = false) : 

Renders a script tag that loads the TinyMCE script.

Parameters

mixed||string|int tagSettings

Name/value array with settings for the script tag.

return

The script tag is return instead of being output if true

Returns

The tag is returned if $return is true

getParam()

getParam(  name,   default) : 

Returns a sanitized query string parameter.

Parameters

name

Name of the query string param to get.

default

Default value if the query string item shouldn't exist.

Returns

Sanitized query string parameter value.