DbRepository: Ensure that we'll work with a instance of DbConnection

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-13 09:52:29 +02:00
parent d5d0c67d2c
commit 7d982068a5
1 changed files with 18 additions and 0 deletions

View File

@ -3,6 +3,7 @@
namespace Icinga\Repository;
use Icinga\Data\Db\DbConnection;
use Icinga\Data\Extensible;
use Icinga\Data\Filter\Filter;
use Icinga\Data\Reducible;
@ -23,6 +24,13 @@ use Icinga\Exception\StatementException;
*/
abstract class DbRepository extends Repository implements Extensible, Updatable, Reducible
{
/**
* The datasource being used
*
* @var DbConnection
*/
protected $ds;
/**
* The statement columns being provided
*
@ -56,6 +64,16 @@ abstract class DbRepository extends Repository implements Extensible, Updatable,
*/
protected $statementColumnMap;
/**
* Create a new DB repository object
*
* @param DbConnection $ds The datasource to use
*/
public function __construct(DbConnection $ds)
{
parent::__construct($ds);
}
/**
* Return the base table name this repository is responsible for
*