2011-08-31 22:25:13 +02:00
|
|
|
<?php
|
|
|
|
|
2012-07-04 01:46:27 +02:00
|
|
|
/**
|
|
|
|
* @group events
|
|
|
|
*/
|
2012-03-14 00:21:04 +01:00
|
|
|
final class PhabricatorEventEngine {
|
2011-08-31 22:25:13 +02:00
|
|
|
|
|
|
|
public static function initialize() {
|
|
|
|
$listeners = PhabricatorEnv::getEnvConfig('events.listeners');
|
|
|
|
foreach ($listeners as $listener) {
|
|
|
|
id(new $listener())->register();
|
|
|
|
}
|
|
|
|
|
2011-11-10 02:23:33 +01:00
|
|
|
// Register the DarkConosole event logger.
|
|
|
|
id(new DarkConsoleEventPluginAPI())->register();
|
2012-07-03 00:42:06 +02:00
|
|
|
id(new ManiphestEdgeEventListener())->register();
|
|
|
|
|
2012-08-24 22:19:47 +02:00
|
|
|
$applications = PhabricatorApplication::getAllInstalledApplications();
|
|
|
|
foreach ($applications as $application) {
|
|
|
|
$listeners = $application->getEventListeners();
|
|
|
|
foreach ($listeners as $listener) {
|
|
|
|
$listener->register();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-31 22:25:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|