0

I am implementing a RequestListener class per the instructions at How to register a new Request Format and Mime Type.

I would like to access the metadata from the routes.yml file (I believe I need a Symfony\Component\Routing\Route object) for the current request so that I can see what formats the current route permits.

How can I obtain this object? Doing var_dump($event); die; resulted in a 600+ MB response.

Nicholas Shanks
  • 10,623
  • 4
  • 56
  • 80

1 Answers1

0

Solution is to make RequestListener a subclass of ContainerAware (or implement ContainerAwareInterface). See @bigmax's answer at: https://stackoverflow.com/a/17126835/760706

Community
  • 1
  • 1
Nicholas Shanks
  • 10,623
  • 4
  • 56
  • 80