Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
namespace Playbloom\Tests;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
class MysqlDriver extends Driver
private static $connection;
* Attempts to establish a connection with the underlying driver.
* @param array $params
* @param string $username
* @param string $password
* @param array $driverOptions
* @return \Doctrine\DBAL\Driver\Connection
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
if (null === self::$connection) {
self::$connection = parent::connect($params, $username, $password, $driverOptions);
return self::$connection;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.