zendframework / zend-eventmanager

Implement event systems, signal slots, intercepting filters, and observers.
BSD 3-Clause "New" or "Revised" License
1.64k stars 62 forks source link

ListenerAggregatePluginManager? #59

Open abacaphiliac opened 7 years ago

abacaphiliac commented 7 years ago

hi Team,

assuming that an application has factories for its listeners, it would be nice to configure them in a central location and to not pollute the service container. any interest?

thanks : )

reinfi commented 7 years ago

I would say that your application should consist auf multiple modules so there are not so many listeners within the service container to have another plugin manager created.

Also you could simply use another php file to separate your listeners to an own config file.

abacaphiliac commented 7 years ago

true, i do take advantage of separate modules and PHP files. but in the merged config all services are listed and available from the application service container despite my modular separation.

a listener plugin manager would provide only implementations of the listener interface, so we would gain some type-safety as well as a reduction in the overall number of services registered in the main application service container.

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-eventmanager; a new issue has been opened at https://github.com/laminas/laminas-eventmanager/issues/3.