private static function getValidityTimestampFilename() { // If 'invalidate()' was called statically, we don't have the // $integrityCachePath yet, so we set it here. if (empty(self::$integrityCachePath)) { $app = \Bolt\Configuration\ResourceManager::getApp(); self::$integrityCachePath = $app['resources']->getPath('cache'); } return self::$integrityCachePath . '/' . self::INTEGRITY_CHECK_TS_FILENAME; }
public function __construct(\Bolt\Application $app) { $this->app = $app; $this->prefix = $this->app['config']->get('general/database/prefix', "bolt_"); // Make sure prefix ends in '_'. Prefixes without '_' are lame.. if ($this->prefix[strlen($this->prefix) - 1] != "_") { $this->prefix .= "_"; } // Check the table integrity only once per hour, per session. (since it's pretty time-consuming. $this->checktimer = 3600; if ($this->app['db']->getDatabasePlatform() instanceof SqlitePlatform) { $this->textDefault = ''; } $this->tables = null; $this->extension_table_generators = array(); self::$integrityCachePath = $this->app['resources']->getPath('cache'); }