'SIMPLE_OPTIMIZATIONS', 'summary_detail_level' => 0, ) ,$userOptions ); $cmd = escapeshellarg(self::$javaExecutable) . ' -Xmx768m -jar ' . escapeshellarg(self::$jarFile); if ($type === 'js') { foreach (array('compilation_level', 'preserve-semi', 'disable-optimizations', 'warning_level', 'summary_detail_level') as $opt) { if (array_key_exists($opt, $o)) { $cmd .= ' --' . $opt . ' ' . $o[$opt]; } } } return $cmd . ' --third_party --js ' . escapeshellarg($tmpFile) . ' --js_output_file ' . escapeshellarg($tmpFile . '.output'); } private static function _prepare() { if (! is_file(self::$jarFile) || ! is_dir(self::$tempDir) || ! is_writable(self::$tempDir) ) { throw new Exception('Minify_ClosureCompiler : $jarFile and $tempDir must be set.'); } } }