Esempio n. 1
0
File: Yui.php Progetto: athem/athem
 /**
  * Compiler constructor.
  *
  * @param mixed $options
  */
 public function __construct($options = array())
 {
     $yui = realpath(__DIR__) . '/../../../../../bin/yuicompresor.jar --type js --charset UTF8 ';
     $java = trim(exec("which java", $output, $return));
     if (!$java) {
         throw new Exception\ShellExec(sprintf('Java does not exist on this machine. Please install JRE. `which java` returned %s %s', $output, $return));
     }
     $options['cli_run'] = empty($options['cli_run']) ? "{$java} -jar {$yui} %s -o %s" : $options['cli_run'];
     parent::__construct($options);
 }
Esempio n. 2
0
 /**
  * @param array $options
  */
 public function __construct($options = array())
 {
     $options['cli_run'] = empty($options['cli_run']) ? realpath(__DIR__) . '/../../../../../bin/minify < %s > %s' : $options['cli_run'];
     parent::__construct($options);
 }