[icinga-checkins] icinga.org: icingaweb2/master: Add method Config::isEmpty()

git at icinga.org git at icinga.org
Wed Nov 19 16:31:48 CET 2014


Module: icingaweb2
Branch: master
Commit: 0124a33037600eed7c4fc8ec99dbc3a148774b5c
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=0124a33037600eed7c4fc8ec99dbc3a148774b5c

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Fri Oct 31 11:20:17 2014 +0100

Add method Config::isEmpty()

---

 library/Icinga/Application/Config.php |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/library/Icinga/Application/Config.php b/library/Icinga/Application/Config.php
index c7998a0..ca377c1 100644
--- a/library/Icinga/Application/Config.php
+++ b/library/Icinga/Application/Config.php
@@ -167,4 +167,14 @@ class Config extends Zend_Config
     {
         return self::$configDir . DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR);
     }
+
+    /**
+     * Is the configuration empty?
+     *
+     * @return bool
+     */
+    public function isEmpty()
+    {
+        return empty($this->_data);
+    }
 }



More information about the icinga-checkins mailing list