mtymek / expressive-config-manager

Lightweight library for merging and caching application config
30 stars 4 forks source link

Allow config providers to return generators #3

Closed mtymek closed 8 years ago

mtymek commented 8 years ago

Config provider can now return generator, which would be iterated in order to read the config. With this addition ConfigManager becomes more flexible, while its usage is still simple:

$configManager = new ConfigManager(
    [
        new GlobFileProvider(__DIR__ . '/config*.php'),
        ApplicationConfig::class,
        BlogConfig::class,
    ]
);

TODO:

weierophinney commented 8 years ago

Nice! :+1: