xp-forge / inject

Dependency injection for the XP Framework
0 stars 0 forks source link

Add support for inheritance via property file section #10

Closed thekid closed 8 years ago

thekid commented 8 years ago

Example

string[name]="Sync"
com.example.Monitoring=com.example.monitoring.Icinga

[add]
string[name]="Add Users"

When ConfiguredBindings is instantiated with "add" as optional constructor argument, bindings are created from the global and the "add" section, with the latter overwriting the defaults (here: the named string binding) and inheriting whatever it does not define explicitely (here: the monitoring binding).

⚠️ Warning

This is a BC break as the ini sections where previously used as namespace import statements (this was undocumented, but still!). This has been changed to a syntax more resembling PHP:

use[]=com.example
use[]=com.example.monitoring

Monitoring=Icinga

Therefore the next release would be 2.0.0