private function process($key, $files, $compiler)
 {
     $result = $this->binder->bind($files, $compiler);
     $entry = new CacheBinderEntry($result, $this->binder->getFiles(), $this->binder->getLastModified());
     $entry->setMimeType($this->binder->getMimeType());
     $entry->setContext($this->context);
     $this->cache->setEntry($key, $entry);
     return $entry;
 }
 private function setCacheEntry($filePath)
 {
     $content = $this->processor->process($filePath);
     $files = $this->processor->getFiles($filePath);
     $lastModified = $this->processor->getLastModified($filePath);
     $entry = new CacheEntry($content, $files, $lastModified);
     $this->cache->setEntry($filePath, $entry);
     $this->entries[$filePath] = $entry;
     return $entry;
 }
Example #3
0
 private function clearCacheEntries(CacheBinderEntry $entry)
 {
     foreach (array_keys($entry->getFiles()) as $file) {
         $this->cache->deleteEntry($file);
     }
 }