CoreApi: allow to set Db object
This commit is contained in:
parent
05edb871dc
commit
1abbab6ce9
|
@ -4,17 +4,27 @@ namespace Icinga\Module\Director\Core;
|
||||||
|
|
||||||
use Icinga\Exception\IcingaException;
|
use Icinga\Exception\IcingaException;
|
||||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||||
|
use Icinga\Module\Director\Objects\IcingaObject;
|
||||||
use Icinga\Module\Director\Objects\DirectorDeploymentLog;
|
use Icinga\Module\Director\Objects\DirectorDeploymentLog;
|
||||||
|
|
||||||
class CoreApi
|
class CoreApi
|
||||||
{
|
{
|
||||||
protected $client;
|
protected $client;
|
||||||
|
|
||||||
|
protected $db;
|
||||||
|
|
||||||
public function __construct(RestApiClient $client)
|
public function __construct(RestApiClient $client)
|
||||||
{
|
{
|
||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Todo: type
|
||||||
|
public function setDb($db)
|
||||||
|
{
|
||||||
|
$this->db = $db;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getObjects($name, $pluraltype, $attrs = array())
|
public function getObjects($name, $pluraltype, $attrs = array())
|
||||||
{
|
{
|
||||||
$name = strtolower($name);
|
$name = strtolower($name);
|
||||||
|
|
Loading…
Reference in New Issue