コード例 #1
0
ファイル: FileFilter.php プロジェクト: finelinePG/imagick
 /**
  * @return File
  */
 public function process()
 {
     if ($this->requiresUpdate() == true) {
         if ($this->previousFilter != null) {
             $this->previousFilter->process();
         }
         $tmpName = tempnam(sys_get_temp_dir(), "filefilter_");
         $this->filter($tmpName);
         saveTmpFile($tmpName, $this->destFile->getPath());
     }
 }
コード例 #2
0
ファイル: YuiFilePacker.php プロジェクト: finelinePG/imagick
 public function pack($jsIncludeArray, $appendLine, $extension)
 {
     $finalFilename = $this->getStubFinalFilename($jsIncludeArray, $extension);
     $outputFile = File::fromFullPath($finalFilename);
     $filter = new ConcatenatingFilter($outputFile, $jsIncludeArray, $appendLine);
     $minFile = $outputFile->addExtension('min', true);
     $filter = new YuiCompressorFilter($filter, $minFile, $this->yuiCommpressorPath);
     $compressedFile = $minFile->addExtension('gz', false);
     $filter = new GzipFilter($filter, $compressedFile);
     $filter->process();
     $finaleFile = $filter->getFile();
     $finalFilename = $finaleFile->getPath();
     return $finalFilename;
 }