original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Validates a database driver
  @return boolean
docstring_tokens: Validates a database driver