Exemple #1
0
 public function __construct(FileFilter $previousFilter, File $outputFile, $filterUpdateMode = FileFilter::CHECK_EXISTS_MTIME_AND_PREVIOUS)
 {
     $this->previousFilter = $previousFilter;
     $this->srcFile = $previousFilter->getFile();
     $this->destFile = clone $outputFile;
     $this->filterUpdateMode = $filterUpdateMode;
 }
 /**
  * @param FileFilter $previousFilter
  * @param $destFile
  * @param YuiCompressorPath $yuiCommpressorPath
  * @param int $filterUpdateMode
  */
 public function __construct(FileFilter $previousFilter, $destFile, YuiCompressorPath $yuiCommpressorPath, $filterUpdateMode = FileFilter::CHECK_EXISTS_MTIME_AND_PREVIOUS)
 {
     $this->yuiCommpressorPath = $yuiCommpressorPath;
     $this->previousFilter = $previousFilter;
     $this->srcFile = $previousFilter->getFile();
     $this->destFile = clone $destFile;
     //$this->modifyFilename($this->srcFile);
     $this->filterUpdateMode = $filterUpdateMode;
 }
 public function __construct(FileFilter $previousFilter, LoggerInterface $logger, $externalLibPath, $storagePath, $filterUpdateMode = FileFilter::CHECK_EXISTS_MTIME_AND_PREVIOUS)
 {
     $this->logger = $logger;
     $this->storagePath = $storagePath;
     $this->externalLibPath = $externalLibPath;
     $this->previousFilter = $previousFilter;
     $this->srcFile = $previousFilter->getFile();
     $this->destFile = $this->srcFile->addExtension('min', true);
     $this->filterUpdateMode = $filterUpdateMode;
 }
Exemple #4
0
 /**
  * @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());
     }
 }