How does Symfony find AsEventListener classes?

  Kiến thức lập trình

I have found a $container->registerAttributeForAutoconfiguration call here but as far as I can tell this does not add classes to the container. Yet the documentation says

An alternative way to define an event listener is to use the AsEventListener PHP attribute. This allows to configure the listener inside its class, without having to add any configuration in external files.

So where can I find the code which adds these classes to the container?

LEAVE A COMMENT