5 * To use this class you must first download the PHP port of Packer
6 * and place the file "class.JavaScriptPacker.php" in /lib (or your
8 * @link http://joliclic.free.fr/php/javascript-packer/en/
10 * Be aware that, as long as HTTP encoding is used, scripts minified with JSMin
11 * will provide better client-side performance, as they need not be unpacked in
17 if (false === (@include 'class.JavaScriptPacker.php')) {
19 'The script "class.JavaScriptPacker.php" is required. Please see: http:'
20 .'//code.google.com/p/minify/source/browse/trunk/min/lib/Minify/Packer.php'
26 * Minify Javascript using Dean Edward's Packer
31 public static function minify($code, $options = array())
33 // @todo: set encoding options based on $options :)
34 $packer = new JavascriptPacker($code, 'Normal', true, false);
35 return trim($packer->pack());