From 5d3fbd1cdf034108c2c292554867c63f979f1e42 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 22 Oct 2013 20:21:03 +0000 Subject: [PATCH] We need a Livestatus factory --- library/Icinga/Data/ResourceFactory.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Icinga/Data/ResourceFactory.php b/library/Icinga/Data/ResourceFactory.php index 3d4343b1c..d94cc4f86 100644 --- a/library/Icinga/Data/ResourceFactory.php +++ b/library/Icinga/Data/ResourceFactory.php @@ -8,6 +8,7 @@ use Zend_Config; use Icinga\Util\ConfigAwareFactory; use Icinga\Exception\ConfigurationError; use Icinga\Data\Db\Connection as DbConnection; +use Icinga\Protocol\Livestatus\Connection as LivestatusConnection; use Icinga\Protocol\Statusdat\Reader as StatusdatReader; class ResourceFactory implements ConfigAwareFactory @@ -39,6 +40,9 @@ class ResourceFactory implements ConfigAwareFactory case 'statusdat': $resource = new StatusdatReader($config); break; + case 'livestatus': + $resource = new LivestatusConnection($config->socket); + break; default: throw new ConfigurationError('Unsupported resource type "' . $config->type . '"');