<?php
namespace Hsi\Firebird\DBAL\Driver;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\ExceptionConverterDriver;
use Doctrine\DBAL\Driver\DriverException;
use Doctrine\DBAL\Exception;
use Hsi\Firebird\DBAL\Platform\FirebirdPlatform;
use Hsi\Firebird\DBAL\Schema\FirebirdSchemaManager;
abstract class AbstractFirebirdDriver implements Driver, ExceptionConverterDriver
{
/**
* {@inheritdoc}
*/
public function convertException($message, DriverException $exception)
{
return new Exception\DriverException($message, $exception);
}
/**
* {@inheritdoc}
*/
public function getDatabase(Connection $conn)
{
$params = $conn->getParams();
return $params['dbname'] ?? '';
}
/**
* {@inheritdoc}
*/
public function getDatabasePlatform()
{
return new FirebirdPlatform();
}
/**
* {@inheritdoc}
*/
public function getSchemaManager(Connection $conn)
{
return new FirebirdSchemaManager($conn);
}
}