Пример #1
0
 /**
  * Run Minify!
  *
  * @return	void
  */
 public static function run()
 {
     self::$_benchmark = microtime(true);
     self::$_memory = memory_get_peak_usage();
     self::loadDefaultOpts();
     self::validateOutputDir();
     self::validateCacheDir();
     self::validatePublicDir();
     self::validateFiles();
     self::includeClasses();
     if (empty(self::$_downloadQueue) === false) {
         self::downloadFiles();
     }
     self::detectMode();
     if (self::evaluate() === false) {
         self::compressFiles();
         self::saveFiles();
         self::saveCacheFile();
     }
     $exec = round(microtime(true) - self::$_benchmark, 3);
     $mem = round((memory_get_peak_usage() - self::$_memory) / 1048576, 3);
     self::log(PHP_EOL . 'Executed in ' . $exec . ' seconds using ' . $mem . 'MB memory.');
 }