Class 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("../js/tinymce/tinymce.gzip.php");
// Renders script tag with compressed scripts TinyMCE_Compressor::renderTag(array( "url" => "../js/tinymce/tinymce.gzip.php", "plugins" => "pagebreak,style", "themes" => "advanced", "languages" => "en" ));
public
|
|
public
&
|
|
public
|
#
handleRequest( )
Handles the incoming HTTP request and sends back a compressed script depending on settings and client support. |
public static
String
|
|
public static
String
|
|
private
Int
|
|
private
String
|
#
getFileContents( String $file )
Returns the contents of the script file if it exists and removes the UTF-8 BOM header if it exists. |
private
|
$files
|
|
private
|
$settings
|
|
private static
array
|
$defaultSettings
|
#
array(
"plugins" => "",
"themes" => "",
"languages" => "",
"disk_cache" => false,
"expires" => "30d",
"cache_dir" => "",
"compress" => true,
"files" => "",
"source" => true,
)
|