JobHook: provide Db
This commit is contained in:
parent
cf1093ef54
commit
36fa4f48a0
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue