/** * Set up the object. Initialize the proper folder for storing the files. * * @param string $cacheDir * @param Silex\Application $app * * @throws \Exception */ public function __construct($cacheDir, Silex\Application $app) { $this->app = $app; try { parent::__construct($cacheDir, $this->extension); } catch (\Exception $e) { $app['logger.system']->critical($e->getMessage(), ['event' => 'exception', 'exception' => $e]); throw $e; } }
/** * Set up the object. Initialize the proper folder for storing the * files. * * @param string $cacheDir * @throws \Exception|\InvalidArgumentException */ public function __construct($cacheDir = null) { $filesystem = new Filesystem(); if (!$filesystem->isAbsolutePath($cacheDir)) { $cacheDir = realpath(__DIR__ . "/" . $cacheDir); } try { parent::__construct($cacheDir, self::DEFAULT_EXTENSION); } catch (\InvalidArgumentException $e) { throw $e; } }
/** * Set up the object. Initialize the proper folder for storing the files. * * @param string $cacheDir * @param Application $app * * @throws \Exception */ public function __construct($cacheDir, Application $app) { $this->app = $app; try { parent::__construct($cacheDir, $this->extension); // If the Bolt version has changed, flush our cache if (!$this->checkCacheVersion()) { $this->clearCache(); } } catch (\Exception $e) { $app['logger.system']->critical($e->getMessage(), ['event' => 'exception', 'exception' => $e]); throw $e; } }
/** * Set up the object. Initialize the proper folder for storing the * files. * * @param string $cacheDir * @throws \Exception|\InvalidArgumentException */ public function __construct($cacheDir = null) { if (!isset($cacheDir)) { $cacheDir = BOLT_CACHE_DIR; } else { // We don't have $app here, so we use the filesystem component // directly here. $filesystem = new Filesystem(); if (!$filesystem->isAbsolutePath($cacheDir)) { $cacheDir = realpath(__DIR__ . "/" . $cacheDir); } } try { parent::__construct($cacheDir, self::DEFAULT_EXTENSION); } catch (\InvalidArgumentException $e) { throw $e; } }
/** * Cache constructor. * * @param string $directory * @param string $extension * @param int $umask * @param AggregateFilesystemInterface $filesystem */ public function __construct($directory, $extension = self::EXTENSION, $umask = 02, AggregateFilesystemInterface $filesystem = null) { parent::__construct($directory, $extension, $umask); $this->filesystem = $filesystem; }
public function __construct() { return parent::__construct(sys_get_temp_dir() . DIRECTORY_SEPARATOR . "sonos"); }
public function __construct($cacheDir) { parent::__construct($cacheDir); }
public function __construct() { parent::__construct($this->path); }