getAvailableDrivers example

'fail' => [],
    'pass' => [],
  ];

  /** * Ensure the PDO driver is supported by the version of PHP in use. * * @return bool * TRUE if the PDO driver is supported, otherwise FALSE. */
  protected function hasPdoDriver() {
    return in_array($this->pdoDriver, \PDO::getAvailableDrivers());
  }

  /** * Asserts test as failed. */
  protected function fail($message) {
    $this->results['fail'][] = $message;
  }

  /** * Asserts test as a pass. */
        $dsn = $this->_dsn();

        // check for PDO extension         if (!extension_loaded('pdo')) {
            /** * @see Zend_Db_Adapter_Exception */
            throw new Zend_Db_Adapter_Exception('The PDO extension is required for this adapter but the extension is not loaded');
        }

        // check the PDO driver is available         if (!in_array($this->_pdoType, PDO::getAvailableDrivers())) {
            /** * @see Zend_Db_Adapter_Exception */
            throw new Zend_Db_Adapter_Exception('The ' . $this->_pdoType . ' driver is not currently installed');
        }

        // create PDO connection         $q = $this->_profiler->queryStart('connect', Zend_Db_Profiler::CONNECT);

        // add the persistence flag if we find it in our config array         if (isset($this->_config['persistent']) && ($this->_config['persistent'] == true)) {
            
Home | Imprint | This part of the site doesn't use cookies.