JobHook: provide Db

This commit is contained in:
Thomas Gelf 2016-04-21 13:24:48 +02:00
parent cf1093ef54
commit 36fa4f48a0
1 changed files with 14 additions and 1 deletions

View File

@ -2,9 +2,11 @@
namespace Icinga\Module\Director\Hook;
use Icinga\Module\Director\Db;
abstract class JobHook
{
protected $settings = array();
private $db;
public function getName()
{
@ -21,6 +23,17 @@ abstract class JobHook
return $class;
}
public function setDb(Db $db)
{
$this->db = $db;
return $this;
}
protected function db()
{
return $this->db;
}
abstract public run();
abstract public function isPending();