Sample PHP code that demonstrates injecting a dependency that is not known until runtime.
To try it / play with it:
$ git clone https://github.com/pwm/dynamic-dependency-injection.git
$ cd dynamic-dependency-injection
$ composer install
$ app/console feed-reader json "http://foobar.com/feed"
Open for suggestions/improvements.