Obtener objeto de ruta de GetResponseEvent

Estoy implementando un 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.

preguntado el 28 de mayo de 14 a las 13:05

1 Respuestas

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

contestado el 23 de mayo de 17 a las 11:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.