Exemplo n.º 1
0
 /**
  * Combine the single given file, and save it to the cache
  *
  * @param $id string The id to save the new file as
  * @param $file string The file to combine or array of files to combine
  * @param $output bool (optional) default TRUE When set to TRUE, outputs the resulted combined file
  */
 private function CombineFiles($id, &$file, $output = TRUE)
 {
     $combiner = new Combiner($this->sourceFolder, $file, $this->minify);
     $result = $combiner->GetResult();
     if ($this->encoding != 'none') {
         $result = gzencode($result, 9, $this->encoding == 'gzip' ? FORCE_GZIP : FORCE_DEFLATE);
     }
     if ($output) {
         $this->output->SetContent($result);
     }
     $this->cache->Save($id, $result);
 }