Doctrine\DBAL\Connection::getDriver PHP Method

getDriver() public method

Gets the DBAL driver instance.
public getDriver ( ) : Doctrine\DBAL\Driver
return Doctrine\DBAL\Driver
    public function getDriver()
    {
        return $this->_driver;
    }

Usage Example

 public function getDsn()
 {
     $driver = $this->connection->getDriver()->getName();
     $user = $this->connection->getUsername();
     $pass = $this->connection->getPassword();
     $host = $this->connection->getHost();
     $db = $this->connection->getDatabase();
     return "{$driver}://{$user}:{$pass}@{$host}/{$db}";
 }
All Usage Examples Of Doctrine\DBAL\Connection::getDriver