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