Issue Type: Improvement Created: 2010-02-04T11:58:05.000+0000 Last Updated: 2012-04-29T10:44:56.000+0000 Status: Closed Fix version(s): Reporter: Stewart Lord (stewartlord) Assignee: Rob Allen (rob) Tags: - Zend\Config
Related issues: Attachments: - String.php
Add the ability to pass an INI string to Zend_Config_Ini and have it parse the string.
At present, it is not possible to parse an INI string via Zend_Config_Ini. The string must be written to a file first.
Posted by Rob Allen (rob) on 2010-02-04T12:13:22.000+0000
As soon as we get to PHP 5.3 as minimum, we can do this as parse_ini_string() will be available.
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-02-04T14:45:02.000+0000
We can do so on trunk already?
Posted by Romeo Disca (jellobird) on 2010-05-01T15:14:38.000+0000
Here is my hack:
I inherit from Zend_Config_Ini and copy and paste the method _parseIniFile($filename).
In this method i changed the parse_ini_file() function to parse_ini_string().
Perhaps there should be some better approach using an abstract class from which Zend_Config_Ini and Zend_Config_String should inherit.
Posted by Rob Allen (rob) on 2012-04-29T10:44:56.000+0000
Fixed in ZF2 with Zend\Config\Reader\Ini::fromString()
Have you found an issue?
See the Overview section for more details.