zendframework/zf2 — pull request #888 by mpinkston (2012-03-05 01:43:42+00:00)
Title: Feature/di assert type - Method of asserting type before Di instantiation

This feature provides a possible method of asserting a resource type
before it is instantiated by the Dependency Injector.

Since it is possible for modules to alter each other's configs (afaik),
I wanted a way to ensure the resource I'm requesting is what I'll actually
get.

I updated Mvc/Application to use this feature in locating the controller.
This allows us to ensure the requested resource is Dispatchable before
it's instantiated.

It uses the existing definition list where possible, so there shouldn't
be much of a performance hit. (Assuming I didn't miss something big..)