DbRepository: Ensure that we'll work with a instance of DbConnection
refs #8826
This commit is contained in:
parent
d5d0c67d2c
commit
7d982068a5
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
namespace Icinga\Repository;
|
namespace Icinga\Repository;
|
||||||
|
|
||||||
|
use Icinga\Data\Db\DbConnection;
|
||||||
use Icinga\Data\Extensible;
|
use Icinga\Data\Extensible;
|
||||||
use Icinga\Data\Filter\Filter;
|
use Icinga\Data\Filter\Filter;
|
||||||
use Icinga\Data\Reducible;
|
use Icinga\Data\Reducible;
|
||||||
|
@ -23,6 +24,13 @@ use Icinga\Exception\StatementException;
|
||||||
*/
|
*/
|
||||||
abstract class DbRepository extends Repository implements Extensible, Updatable, Reducible
|
abstract class DbRepository extends Repository implements Extensible, Updatable, Reducible
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The datasource being used
|
||||||
|
*
|
||||||
|
* @var DbConnection
|
||||||
|
*/
|
||||||
|
protected $ds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The statement columns being provided
|
* The statement columns being provided
|
||||||
*
|
*
|
||||||
|
@ -56,6 +64,16 @@ abstract class DbRepository extends Repository implements Extensible, Updatable,
|
||||||
*/
|
*/
|
||||||
protected $statementColumnMap;
|
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
|
* Return the base table name this repository is responsible for
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue