Пример #1
0
 protected function init_model()
 {
     $model = new Model_Log_SQLite($this->config, SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE);
     if (!$model->create_table_if_not_exists()) {
         throw new Exception('For some reason the table in SQLite database can not be created');
     }
     $model->create_indexes_if_not_exists();
     return $model;
 }