From 79ade944ded06ebebb30a2df386dee25fc719022 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 20 Oct 2014 13:40:35 +0200 Subject: [PATCH] Resources: Support type 'ini' yet only in the resources.ini Configuring the resource type 'ini' via the web interface is not yet possible. --- library/Icinga/Data/ResourceFactory.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Data/ResourceFactory.php b/library/Icinga/Data/ResourceFactory.php index e85413615..1c443f9d0 100644 --- a/library/Icinga/Data/ResourceFactory.php +++ b/library/Icinga/Data/ResourceFactory.php @@ -4,8 +4,9 @@ namespace Icinga\Data; -use Icinga\Exception\ProgrammingError; use Zend_Config; +use Icinga\Application\Config; +use Icinga\Exception\ProgrammingError; use Icinga\Util\ConfigAwareFactory; use Icinga\Exception\ConfigurationError; use Icinga\Data\Db\DbConnection; @@ -120,6 +121,9 @@ class ResourceFactory implements ConfigAwareFactory case 'file': $resource = new FileReader($config); break; + case 'ini': + $resource = Config::fromIni($config->ini); + break; default: throw new ConfigurationError( 'Unsupported resource type "%s"',