Example #1
0
 /**
  * Automatic driver detection
  *
  * @return string
  * @throws Exception\Database
  */
 protected function autodetectDriver()
 {
     foreach ($this->drivers as $driver => $class) {
         if ($this->getDriver($driver)->isAvailable() === true) {
             return $driver;
         }
     }
     throw Exception\Database::driverAutodetectFailed($this->getName());
 }