From 6627b5ae6ef39132dafe73a613815d8fc60cb50a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 11 Nov 2014 16:29:07 +0100 Subject: [PATCH] Monitoring\Object: use MonitoringBackend refs #7635 --- .../monitoring/library/Monitoring/Object/Host.php | 6 +++--- .../library/Monitoring/Object/MonitoredObject.php | 12 ++++++------ .../monitoring/library/Monitoring/Object/Service.php | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Object/Host.php b/modules/monitoring/library/Monitoring/Object/Host.php index 483cb2bae..831579a57 100644 --- a/modules/monitoring/library/Monitoring/Object/Host.php +++ b/modules/monitoring/library/Monitoring/Object/Host.php @@ -5,7 +5,7 @@ namespace Icinga\Module\Monitoring\Object; use InvalidArgumentException; -use Icinga\Module\Monitoring\Backend; +use Icinga\Module\Monitoring\Backend\MonitoringBackend; /** * A Icinga host @@ -63,10 +63,10 @@ class Host extends MonitoredObject /** * Create a new host * - * @param Backend $backend Backend to fetch host information from + * @param MonitoringBackend $backend Backend to fetch host information from * @param string $host Host name */ - public function __construct(Backend $backend, $host) + public function __construct(MonitoringBackend $backend, $host) { parent::__construct($backend); $this->host = $host; diff --git a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php index ecd1a9cf6..abab3c0e3 100644 --- a/modules/monitoring/library/Monitoring/Object/MonitoredObject.php +++ b/modules/monitoring/library/Monitoring/Object/MonitoredObject.php @@ -7,7 +7,7 @@ namespace Icinga\Module\Monitoring\Object; use InvalidArgumentException; use Icinga\Application\Config; use Icinga\Exception\InvalidPropertyException; -use Icinga\Module\Monitoring\Backend; +use Icinga\Module\Monitoring\Backend\MonitoringBackend; use Icinga\Web\UrlParams; /** @@ -28,7 +28,7 @@ abstract class MonitoredObject /** * Backend to fetch object information from * - * @var Backend + * @var MonitoringBackend */ protected $backend; @@ -119,9 +119,9 @@ abstract class MonitoredObject /** * Create a monitored object, i.e. host or service * - * @param Backend $backend Backend to fetch object information from + * @param MonitoringBackend $backend Backend to fetch object information from */ - public function __construct(Backend $backend) + public function __construct(MonitoringBackend $backend) { $this->backend = $backend; } @@ -480,9 +480,9 @@ abstract class MonitoredObject public static function fromParams(UrlParams $params) { if ($params->has('service') && $params->has('host')) { - return new Service(Backend::createBackend(), $params->get('host'), $params->get('service')); + return new Service(MonitoringBackend::createBackend(), $params->get('host'), $params->get('service')); } elseif ($params->has('host')) { - return new Host(Backend::createBackend(), $params->get('host')); + return new Host(MonitoringBackend::createBackend(), $params->get('host')); } return null; } diff --git a/modules/monitoring/library/Monitoring/Object/Service.php b/modules/monitoring/library/Monitoring/Object/Service.php index 28d0338f2..6d5245f0d 100644 --- a/modules/monitoring/library/Monitoring/Object/Service.php +++ b/modules/monitoring/library/Monitoring/Object/Service.php @@ -5,7 +5,7 @@ namespace Icinga\Module\Monitoring\Object; use InvalidArgumentException; -use Icinga\Module\Monitoring\Backend; +use Icinga\Module\Monitoring\Backend\MonitoringBackend; /** * A Icinga service @@ -68,11 +68,11 @@ class Service extends MonitoredObject /** * Create a new service * - * @param Backend $backend Backend to fetch service information from + * @param MonitoringBackend $backend Backend to fetch service information from * @param string $host Host name the service is running on * @param string $service Service name */ - public function __construct(Backend $backend, $host, $service) + public function __construct(MonitoringBackend $backend, $host, $service) { parent::__construct($backend); $this->host = new Host($backend, $host);