Resources: Support type 'ini' yet only in the resources.ini

Configuring the resource type 'ini' via the web interface is not yet possible.
This commit is contained in:
Eric Lippmann 2014-10-20 13:40:35 +02:00
parent cee261bf7e
commit 79ade944de
1 changed files with 5 additions and 1 deletions

View File

@ -4,8 +4,9 @@
namespace Icinga\Data; namespace Icinga\Data;
use Icinga\Exception\ProgrammingError;
use Zend_Config; use Zend_Config;
use Icinga\Application\Config;
use Icinga\Exception\ProgrammingError;
use Icinga\Util\ConfigAwareFactory; use Icinga\Util\ConfigAwareFactory;
use Icinga\Exception\ConfigurationError; use Icinga\Exception\ConfigurationError;
use Icinga\Data\Db\DbConnection; use Icinga\Data\Db\DbConnection;
@ -120,6 +121,9 @@ class ResourceFactory implements ConfigAwareFactory
case 'file': case 'file':
$resource = new FileReader($config); $resource = new FileReader($config);
break; break;
case 'ini':
$resource = Config::fromIni($config->ini);
break;
default: default:
throw new ConfigurationError( throw new ConfigurationError(
'Unsupported resource type "%s"', 'Unsupported resource type "%s"',