Example #1
0
 public function getAssetFile($group, &$files = array(), &$codes = array())
 {
     $this->group = $group;
     $this->files = $files;
     $this->codes = $codes;
     $cache = new N2CacheManifest($group, true, true);
     $hash = $this->getHash();
     return $cache->makeCache($group . "." . $this->outputFileType, $hash, array($this, 'getCachedContent'));
 }
Example #2
0
 public function makeCache($fileName, $hash, $callable)
 {
     $variations = 1;
     if (N2Filesystem::existsFile($this->getManifestFilePath('variations'))) {
         $variations = intval(N2Filesystem::readFile($this->getManifestFilePath('variations')));
     }
     return parent::makeCache($fileName . mt_rand(1, $variations), $hash, $callable);
 }
Example #3
0
 /**
  * @param N2SmartSliderAbstract        $slider
  * @param N2SmartSliderSlidesGenerator $generator
  */
 public function __construct($slider, $generator)
 {
     parent::__construct($slider->cacheId, false);
     $this->slider = $slider;
     $this->generator = $generator;
 }