Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource parameters not attached to ResourceEvent on custom ResourceController class #118

Open
Wilt opened this issue Oct 25, 2013 · 0 comments

Comments

@Wilt
Copy link
Contributor

Wilt commented Oct 25, 2013

If I register a custom ResourceController class in the config using the controller_class parameter I run into the problem that the resource parameters are not available in the ResourceEvent in my listeners. The parameters are injected on dispatch by ResourceParameterListener but only attached to PhlyRestfully\ResourceController: https://github.com/phly/PhlyRestfully/blob/master/src/PhlyRestfully/Listener/ResourceParametersListener.php#L57
Is this expected behaviour? How do I get the parameters in my custom controller? Should I register my own custom version of ResourceParameterListener in config.php? Some advice on how to do this would be great.

UPDATE:
It also works if I set the event identifier for my controller in the resources configuration to: 'identifier' => 'PhlyRestfully\ResourceController'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant