Lines Matching +full:exception +full:no +full:sqlite +(+path:plugin +path:struct) -(+path:plugin +path:struct +path:lang)
12 use dokuwiki\plugin\sqlite\SQLiteDB;
18 protected $sqlite;
23 * @throws Exception
27 $this->sqlite = new SQLiteDB('struct', DOKU_PLUGIN . 'struct/db/');
30 $this->sqlite->getPdo()->sqliteCreateFunction('STRUCT_JSON', [$this, 'STRUCT_JSON'], -1);
33 $this->sqlite->getPdo()->sqliteCreateFunction('STRUCT_LOOKUP', [$this, 'STRUCT_LOOKUP'], -1);
36 $this->sqlite->getPdo()->sqliteCreateFunction('IS_PUBLISHER', [$this, 'IS_PUBLISHER'], -1);
40 * @param bool $throw throw an Exception when sqlite not available or fails to load
42 * @throws Exception
46 if (!$this->sqlite instanceof SQLiteDB) {
48 if ($throw || defined('DOKU_UNITTEST')) throw new StructException('no sqlite');
54 } catch (\Exception $exception) {
55 ErrorHandler::logException($exception);
56 if ($throw) throw $exception;
60 return $this->sqlite;
70 if (!$this->sqlite) return;
71 $file = $this->sqlite->getDbFile();
75 $this->sqlite = null;
102 } catch (\JsonException $exception) {