Пример #1
0
 /**
  * Check for MySQL Adapter Requirements
  *
  * @throws Next\DB\Driver\DriverException
  *   PDO_MYSQL Extension was not loaded
  */
 protected function checkRequirements()
 {
     // Checking for PDO Extension
     parent::checkRequirements();
     // Checking for PDO MySQL Extension
     if (!in_array('mysql', \PDO::getAvailableDrivers())) {
         throw DriverException::unfullfilledRequirements('PDO MySQL Driver was not loaded');
     }
 }
Пример #2
0
 /**
  * Check for Connection Driver Requirements
  *
  * @throws Next\DB\Driver\DriverException
  *   PDO Extension was not loaded
  */
 protected function checkRequirements()
 {
     if (!extension_loaded('pdo')) {
         throw DriverException::unfullfilledRequirements('PDO Extension was not loaded');
     }
 }