Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Readme

  • Loading branch information...
commit 90b6b23df9cc84c02d36d9f4fbfaca71ebb10d16 1 parent 755fa13
@wdalmut authored
Showing with 23 additions and 1 deletion.
  1. +23 −1 README.md
View
24 README.md
@@ -45,7 +45,7 @@ $conf->load(__DIR__ . '/my.ini');
var_dump(conf->a); // array(one,two,three)
```
-### Nested objects
+## Nested objects
Nested Objects
@@ -62,3 +62,25 @@ $conf->load(__DIR__ . '/my.ini');
echo conf->production()->a->b-c; // will echo "hello"
```
+## Multiple sections
+
+```ini
+[mysql]
+db.host = "localhost"
+db.user = "user"
+db.password = "password"
+
+[redis]
+nosql.a.host = "localhost"
+nosql.b.host = "192.168.2.2"
+```
+
+```php
+<?php
+$conf = new Config();
+$conf->load(__DIR__ . '/my.ini');
+
+echo $conf->mysql()->db->host; // localhost
+
+echo $conf->redis()->nosql->b->host; // 192.168.2.2
+```
Please sign in to comment.
Something went wrong with that request. Please try again.