protected function validateDbTypeInstall()
    {
        $field = 'database.type';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if (empty($value)) {
            $this->setErrorRequired($field, $this->translation->text('Database type'));
            return false;
        }

        $drivers = \PDO::getAvailableDrivers();

        if (in_array($value, $drivers)) {
            return true;
        }

        $error = $this->translation->text('Unsupported database driver. Available drivers: @list', array(
            '@list' => implode(',', $drivers)));

        $this->setError($field, $error);
        return false;
    }
protected function validateDbTypeInstall()
    {
        $field = 'database.type';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if (empty($value)) {
            $this->setErrorRequired($field, $this->translation->text('Database type'));
            return false;
        }

        $drivers = \PDO::getAvailableDrivers();

        if (in_array($value, $drivers)) {
            return true;
        }

        $error = $this->translation->text('Unsupported database driver. Available drivers: @list', array(
            '@list' => implode(',', $drivers)));

        $this->setError($field, $error);
        return false;
    }
protected function validateDbTypeInstall ( ) { $ field = 'database.type' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ this -> translation -> text ( 'Database type' ) ) ; return false ; } $ drivers = \ PDO :: getAvailableDrivers ( ) ; if ( in_array ( $ value , $ drivers ) ) { return true ; } $ error = $ this -> translation -> text ( 'Unsupported database driver. Available drivers: @list' , array ( '@list' => implode ( ',' , $ drivers ) ) ) ; $ this -> setError ( $ field , $ error ) ; return false ; }
Validates a database driver
@return boolean
Validates a database driver