From 1ca83c001fe7df8e2e7e1f0964ed95fe5cf5d7a4 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 11 Nov 2014 17:33:31 +0100 Subject: [PATCH] MonitoringBackend: just a few comments fixes #7635 --- .../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 4de5f1d31..11a8fb699 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) {