diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:21:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:21:16 +0000 |
commit | 2e582fe0b8b6a8e67982ddb84935db1bd3b401fe (patch) | |
tree | dd511b321f308264952cffb005a4288ea4e478e6 /library/Graphite/Util/IcingadbUtils.php | |
parent | Initial commit. (diff) | |
download | icingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.tar.xz icingaweb2-module-graphite-2e582fe0b8b6a8e67982ddb84935db1bd3b401fe.zip |
Adding upstream version 1.2.2.upstream/1.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/Graphite/Util/IcingadbUtils.php')
-rw-r--r-- | library/Graphite/Util/IcingadbUtils.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/library/Graphite/Util/IcingadbUtils.php b/library/Graphite/Util/IcingadbUtils.php new file mode 100644 index 0000000..43334e5 --- /dev/null +++ b/library/Graphite/Util/IcingadbUtils.php @@ -0,0 +1,49 @@ +<?php + +/* Icinga Graphite Web | (c) 2022 Icinga GmbH | GPLv2 */ + +namespace Icinga\Module\Graphite\Util; + +use Icinga\Module\Icingadb\Common\Auth; +use Icinga\Module\Icingadb\Common\Database; +use Icinga\Module\Icingadb\Common\Macros; + +/** +* Class for initialising icingadb utils + */ +class IcingadbUtils +{ + use Macros; + use Database; + use Auth; + + protected static $instance; + + /** + * @see getInstance() + */ + private function __construct() + { + } + + /** + * Get the IcingadbUtils instance + * + * @return IcingadbUtils + */ + public static function getInstance(): IcingadbUtils + { + if (self::$instance === null) { + self::$instance = new self(); + } + + return static::$instance; + } + + /** + * Prevent the instance from being cloned (which would create a second instance of it) + */ + private function __clone() + { + } +} |