diff --git a/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php b/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php index 8bb80efeb1c..e3917c968d8 100644 --- a/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php +++ b/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php @@ -80,7 +80,7 @@ * @author Lars Strojny * @author Benjamin Eberlei */ -class MasterSlaveConnection extends Connection +class MasterSlaveConnection extends Connection implements MasterSlaveConnectionInterface { /** * Master and slave connection (one of the randomly picked slaves). @@ -127,9 +127,7 @@ public function __construct(array $params, Driver $driver, Configuration $config } /** - * Checks if the connection is currently towards the master or not. - * - * @return boolean + * {@inheritdoc} */ public function isConnectedToMaster() { diff --git a/lib/Doctrine/DBAL/Connections/MasterSlaveConnectionInterface.php b/lib/Doctrine/DBAL/Connections/MasterSlaveConnectionInterface.php new file mode 100644 index 00000000000..0940176831f --- /dev/null +++ b/lib/Doctrine/DBAL/Connections/MasterSlaveConnectionInterface.php @@ -0,0 +1,37 @@ +. + */ + +namespace Doctrine\DBAL\Connections; + +use Doctrine\DBAL\Driver\Connection; + +/** + * Class MasterSlaveConnectionInterface + * @package Doctrine\DBAL\Connections + * @author Tocila Ionut + */ +interface MasterSlaveConnectionInterface extends Connection +{ + /** + * Checks if the connection is currently towards the master or not. + * + * @return boolean + */ + public function isConnectedToMaster(); +} \ No newline at end of file