Created
August 9, 2013 09:11
-
-
Save ludofleury/6192292 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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