Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / console / plugin / event / DarkConsoleEventPluginAPI.php
blob08db894e4e185fe61cc970c6f6a8b2e65f26e7da
1 <?php
3 final class DarkConsoleEventPluginAPI extends PhabricatorEventListener {
5 private static $events = array();
6 private static $discardMode = false;
8 public static function enableDiscardMode() {
9 self::$discardMode = true;
12 public static function getEvents() {
13 return self::$events;
16 public function register() {
17 $this->listen(PhabricatorEventType::TYPE_ALL);
20 public function handleEvent(PhutilEvent $event) {
21 if (self::$discardMode) {
22 return;
24 self::$events[] = $event;