Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Allowing the route match controller to override the controller class #7336

Conversation

tklever
Copy link
Contributor

@tklever tklever commented Mar 18, 2015

Updates to InjectTemplateListener to allow for the RouteMatch "controller" parameter to override the controller's class.

Use case is to handle controllers that are built by abstract factories, which require extra rendering logic because this resolver will always use the get_class() method over what's in the RouteMatch (oftentimes a base or parent class).

Also helpful with the reverse, which is extended or decorator controllers appearing (and rendering) as their parent controller.

The behavior is off by default for backwards compatibility (1 test broke, so close).

@tklever
Copy link
Contributor Author

tklever commented Mar 18, 2015

Travis reporting what I believe are false positives. 5.3 and 5.6 failed, but the Mvc test block looks clean

@weierophinney
Copy link
Member

I like it — clean implementation, and fully backwards compatible (because it's opt-in)! Merging for 2.4.

@weierophinney weierophinney added this to the 2.4.0 milestone Mar 19, 2015
@weierophinney weierophinney merged commit d02de84 into zendframework:develop Mar 19, 2015
weierophinney added a commit that referenced this pull request Mar 19, 2015
…-route-match

Allowing the route match controller to override the controller class
weierophinney added a commit that referenced this pull request Mar 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants