You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 14, 2022. It is now read-only.
Rather than just relying on the fallback (which isn't compatible with ACL), I'm testing for the presence of the template then injecting it into the router stack on the bootstrap event. This means that each and every page dynamically has an actual literal route.
I'm still overloading the notFoundAction, however the only way it can possible hit this is if there's a template which has caused the router to send it to that page. Hence, this just returns the view.
I'm still not able to get around this as the ZF2 route listener uses method_exists to check for the presence of the action, which doesn't take any notice of a __call method. Hence, if the action doesn't exist, it will always use the notFoundAction.
I'd love it if you guys could download it and have a play as it's a fairly major change. I'm also keen to work out a way to unit test this. Since it's impossible to check for an action, we should be able to test the route as this is now working. Thoughts?
Here's the concept:
Rather than just relying on the fallback (which isn't compatible with ACL), I'm testing for the presence of the template then injecting it into the router stack on the bootstrap event. This means that each and every page dynamically has an actual literal route.
I'm still overloading the notFoundAction, however the only way it can possible hit this is if there's a template which has caused the router to send it to that page. Hence, this just returns the view.
I'm still not able to get around this as the ZF2 route listener uses method_exists to check for the presence of the action, which doesn't take any notice of a __call method. Hence, if the action doesn't exist, it will always use the notFoundAction.
I'd love it if you guys could download it and have a play as it's a fairly major change. I'm also keen to work out a way to unit test this. Since it's impossible to check for an action, we should be able to test the route as this is now working. Thoughts?