mtymek / expressive-config-manager

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

Invokable providers #2

Closed mtymek closed 8 years ago

mtymek commented 8 years ago

This PR removes ConfigProvider interface. From now on, config providers are simple invokable classes that should return an array when called.

weierophinney commented 8 years ago

I like this idea as well. While it's nice to have interfaces, callables allow a fair amount of flexibility, and also enforce single-purpose classes (i.e., you cannot mix a configuration class with a middleware class).