icingaweb2/modules/monitoring/library/Monitoring/Object/Host.php

31 lines
664 B
PHP
Raw Normal View History

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