Jannis Moßhammer 44be5e85da Refactoring and Query and IDO code,
the Monitoring/View code was completly dropped in favor of
the DataView implementations, as new Backends otherwise
would require to implement two seperate query logics

refs #3801
2013-10-17 19:54:58 +02:00

31 lines
713 B
PHP

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