Example #1
0
 public function getEngine()
 {
     if (is_null($this->engine)) {
         $this->setEngine(Engine::MYISAM());
     }
     return $this->engine;
 }
 public function getTableManager()
 {
     if (is_null($this->tableManager)) {
         $this->tableManager = new TableManager($this->getFilesystem(), $this->getSchemaManager());
         $columnDataFactory = new ColumnDataFactory($this->getFilesystem());
         $tableFactory = new TableFactory($this->getFilesystem(), $columnDataFactory);
         foreach ([Engine::MARIADB(), Engine::MYISAM(), Engine::INNODB()] as $engine) {
             $this->tableManager->registerFactory($engine, $tableFactory);
         }
         $this->tableManager->registerFactory(Engine::INFORMATION_SCHEMA(), new InformationSchemaTableFactory($this->schemaManager));
         # TODO: add factories for all the other table-engines out there
     }
     return $this->tableManager;
 }