| @@ 266-272 (lines=7) @@ | ||
| 263 | * |
|
| 264 | * @param string $table table name without the prefix |
|
| 265 | */ |
|
| 266 | public function dropTable($table) { |
|
| 267 | $table = $this->tablePrefix . trim($table); |
|
| 268 | $schema = $this->getSchemaManager(); |
|
| 269 | if($schema->tablesExist(array($table))) { |
|
| 270 | $schema->dropTable($table); |
|
| 271 | } |
|
| 272 | } |
|
| 273 | ||
| 274 | /** |
|
| 275 | * Check if a table exists |
|
| @@ 72-79 (lines=8) @@ | ||
| 69 | * |
|
| 70 | * @param string $table table name without the prefix |
|
| 71 | */ |
|
| 72 | public function dropTable($table) { |
|
| 73 | $table = $this->tablePrefix . trim($table); |
|
| 74 | $table = $this->quoteIdentifier($table); |
|
| 75 | $schema = $this->getSchemaManager(); |
|
| 76 | if($schema->tablesExist(array($table))) { |
|
| 77 | $schema->dropTable($table); |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||
| 81 | /** |
|
| 82 | * Check if a table exists |
|
| @@ 87-92 (lines=6) @@ | ||
| 84 | * @param string $table table name without the prefix |
|
| 85 | * @return bool |
|
| 86 | */ |
|
| 87 | public function tableExists($table){ |
|
| 88 | $table = $this->tablePrefix . trim($table); |
|
| 89 | $table = $this->quoteIdentifier($table); |
|
| 90 | $schema = $this->getSchemaManager(); |
|
| 91 | return $schema->tablesExist(array($table)); |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||