MiniAsset\Factory::cacher PHP Метод

cacher() публичный Метод

Create an AssetCacher
public cacher ( string $path = '' ) : MiniAsset\AssetCacher
$path string The path to cache assets into.
Результат MiniAsset\AssetCacher
    public function cacher($path = '')
    {
        if (!$path) {
            $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR;
        }
        $cache = new AssetCacher($path, $this->config->theme());
        $cache->configTimestamp($this->config->modifiedTime());
        $cache->filterRegistry($this->filterRegistry());
        return $cache;
    }

Usage Example

Пример #1
0
 /**
  * Create an AssetCacher
  *
  * @param string $path The path to read from. Defaults to the application CACHE path.
  * @return \MiniAsset\Output\AssetCacher
  */
 public function cacher($path = '')
 {
     if ($path == '') {
         $path = CACHE . 'asset_compress' . DS;
     }
     return parent::cacher($path);
 }