phalcon/cphalcon — pull request #829 by kjdev (2013-07-11 22:59:35+00:00)
Title: parsing of ini files.

No section.

# test.ini
hoge=test
foo=bar

# PHP
$config = new \Phalcon\Config\Adapter\Ini(__DIR__ . '/test.ini');
$config->toArray();
// => Fatal error: Phalcon\Config\Adapter\Ini::__construct(): The argument is not iterable()

// => Update:
// array(2) {
// 'hoge' => "test"
// 'foo' => "bar"
// }

No section items.

# test.ini
[section]
hoge=test
[empty]
[test]
foo=bar

# PHP
$config = new \Phalcon\Config\Adapter\Ini(__DIR__ . '/test.ini');
$config->toArray();
// =>
// array(2) {
// 'section' => array(1) { 'hoge' => "test" }
// 'test' => array(1) { 'foo' => "bar" }
// }

// => UPDATE:
// array(2) {
// 'section' => array(1) { 'hoge' => "test" }
// 'empty' => array(0) {}
// 'test' => array(1) { 'foo' => "bar" }
// }