[icinga-checkins] icinga.org: icingaweb2/feature/setup-wizard-7163: MonitoringBackend: just a few comments

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


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Nov 11 17:33:31 2014 +0100

MonitoringBackend: just a few comments

fixes #7635

---

 .../library/Monitoring/Backend/MonitoringBackend.php |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php b/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php
index 4de5f1d..11a8fb6 100644
--- a/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php
+++ b/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php
@@ -14,8 +14,10 @@ use Icinga\Exception\ProgrammingError;
 class MonitoringBackend implements Selectable, Queryable, ConnectionInterface
 {
     /**
-     * @var Config
+     * Backend configuration
      *
+     * @var Config
+     */
     protected $config;
 
     /**
@@ -58,6 +60,15 @@ class MonitoringBackend implements Selectable, Queryable, ConnectionInterface
         $this->config = $config;
     }
 
+    /**
+     * Get a backend instance
+     *
+     * You may ask for a specific backend name or get the default one otherwise
+     *
+     * @param  string $name Backend name
+     *
+     * @return MonitoringBackend
+     */
     public static function instance($name = null)
     {
         if (! array_key_exists($name, self::$instances)) {
@@ -206,6 +217,11 @@ class MonitoringBackend implements Selectable, Queryable, ConnectionInterface
         return self::instance($name);
     }
 
+    /**
+     * Get this backend's internal resource
+     *
+     * @return mixed
+     */
     public function getResource()
     {
         if ($this->resource === null) {



More information about the icinga-checkins mailing list