CoreApi: allow to set Db object

This commit is contained in:
Thomas Gelf 2015-11-13 23:50:00 +01:00
parent 05edb871dc
commit 1abbab6ce9
1 changed files with 10 additions and 0 deletions

View File

@ -4,17 +4,27 @@ namespace Icinga\Module\Director\Core;
use Icinga\Exception\IcingaException;
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
use Icinga\Module\Director\Objects\IcingaObject;
use Icinga\Module\Director\Objects\DirectorDeploymentLog;
class CoreApi
{
protected $client;
protected $db;
public function __construct(RestApiClient $client)
{
$this->client = $client;
}
// Todo: type
public function setDb($db)
{
$this->db = $db;
return $this;
}
public function getObjects($name, $pluraltype, $attrs = array())
{
$name = strtolower($name);