Jannis Moßhammer f350011028 Add Status.dat backend
refs #3801
2013-10-20 15:16:44 +02:00

31 lines
664 B
PHP

<?php
namespace Icinga\Module\Monitoring\Object;
use Icinga\Data\BaseQuery as Query;
use Icinga\Module\Monitoring\DataView\HostStatus;
class Host extends AbstractObject
{
public $type = self::TYPE_HOST;
public $prefix = 'host_';
private $view = null;
public function populate()
{
$this->fetchComments()
->fetchDowntimes()
->fetchHostgroups()
->fetchContacts()
->fetchContactGroups();
}
protected function getProperties()
{
$this->view = HostStatus::fromRequest($this->getRequest());
return $this->view->getQuery()->fetchRow();
}
}