-
Notifications
You must be signed in to change notification settings - Fork 62
How i can get all events=>callbacks? #22
Comments
Please look at the docs: Removed Functionality |
I have dirty solution (in \Zend\EventManager\EventManager): class EventManager implements EventManagerInterface
{
// ...
public static $allEvents = [];
// ...
public function attach($event, $callback = null, $priority = 1)
{
// ...
if (empty($this->events[$event])) {
$this->events[$event] = new PriorityQueue();
self::$allEvents[$event] = new PriorityQueue();
}
// ...
$this->events[$event]->insert($listener, $priority);
self::$allEvents[$event]->insert($listener, $priority);
return $listener;
} after this i see all :) but this is unacceptable and very dirty. |
@froschdesign $this->setEventManager(new EventManager());
// or
$this->events = new EventManager(); in my task i need get all (ALL in whole app) events and handlers. |
Now i have problem: I have big application with many modules, and when i see in code I want solve this faster if i have map: events=>callbacks+priorities, like this:
|
@maxgu checkout this https://github.com/snapshotpl/ZfSnapEventDebugger |
@froschdesign He's asking about v2, not v3. @maxgu — The following methods will assist:
Hopefully with the above information, you can stitch something together! |
@snapshotpl thnx, but
|
This repository has been closed and moved to laminas/laminas-eventmanager; a new issue has been opened at laminas/laminas-eventmanager#8. |
in EventManager v2.* can i get all events names\callbacks for my application
The text was updated successfully, but these errors were encountered: