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
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'
The text was updated successfully, but these errors were encountered:
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 theResourceEvent
in my listeners. The parameters are injected on dispatch byResourceParameterListener
but only attached toPhlyRestfully\ResourceController
: https://github.com/phly/PhlyRestfully/blob/master/src/PhlyRestfully/Listener/ResourceParametersListener.php#L57Is 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'
The text was updated successfully, but these errors were encountered: