예제 #1
0
파일: Cache.php 프로젝트: zomars/bolt
 /**
  * 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;
     }
 }
예제 #2
0
 /**
  * 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;
     }
 }
예제 #3
0
파일: Cache.php 프로젝트: nectd/nectd-web
 /**
  * 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;
     }
 }
예제 #4
0
파일: Cache.php 프로젝트: LeonB/site
 /**
  * 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;
     }
 }
예제 #5
0
파일: Cache.php 프로젝트: MenZil-Team/bolt
 /**
  * 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;
 }
예제 #6
0
 public function __construct()
 {
     return parent::__construct(sys_get_temp_dir() . DIRECTORY_SEPARATOR . "sonos");
 }
예제 #7
0
 public function __construct($cacheDir)
 {
     parent::__construct($cacheDir);
 }
예제 #8
0
 public function __construct()
 {
     parent::__construct($this->path);
 }