Obtener objeto de ruta de GetResponseEvent
Frecuentes
Visto 321 equipos
0
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.
1 Respuestas
0
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 symfony routes or haz tu propia pregunta.