[icinga-checkins] icinga.org: icingaweb2/feature/setup-wizard-7163: Monitoring\Object: use MonitoringBackend

git at icinga.org git at icinga.org
Wed Nov 12 12:11:30 CET 2014


Module: icingaweb2
Branch: feature/setup-wizard-7163
Commit: 6627b5ae6ef39132dafe73a613815d8fc60cb50a
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=6627b5ae6ef39132dafe73a613815d8fc60cb50a

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Nov 11 16:29:07 2014 +0100

Monitoring\Object: use MonitoringBackend

refs #7635

---

 modules/monitoring/library/Monitoring/Object/Host.php      |    6 +++---
 .../library/Monitoring/Object/MonitoredObject.php          |   12 ++++++------
 modules/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 483cb2b..831579a 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 ecd1a9c..abab3c0 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 28d0338..6d5245f 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);



More information about the icinga-checkins mailing list