| Conditions | 5 |
| Paths | 6 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function check(ResultCollection $results) |
||
| 29 | { |
||
| 30 | $result = $results->createResult(); |
||
| 31 | |||
| 32 | $dbAdapter = $this->resource->getConnection(); |
||
| 33 | |||
| 34 | $engines = $dbAdapter->fetchAll('SHOW ENGINES'); |
||
| 35 | $innodbFound = false; |
||
| 36 | foreach ($engines as $engine) { |
||
| 37 | if (strtolower($engine['Engine']) == 'innodb') { |
||
| 38 | $innodbFound = true; |
||
| 39 | break; |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | $result->setStatus($innodbFound ? Result::STATUS_OK : Result::STATUS_ERROR); |
||
| 44 | |||
| 45 | if ($innodbFound) { |
||
| 46 | $result->setMessage("<info>Required MySQL Storage Engine <comment>InnoDB</comment> found.</info>"); |
||
| 47 | } else { |
||
| 48 | $result->setMessage("<error>Required MySQL Storage Engine \"InnoDB\" not found!</error>"); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |