[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/console/plugin/event/ -> DarkConsoleEventPluginAPI.php (source)

   1  <?php
   2  
   3  final class DarkConsoleEventPluginAPI extends PhabricatorEventListener {
   4  
   5    private static $events = array();
   6    private static $discardMode = false;
   7  
   8    public static function enableDiscardMode() {
   9      self::$discardMode = true;
  10    }
  11  
  12    public static function getEvents() {
  13      return self::$events;
  14    }
  15  
  16    public function register() {
  17      $this->listen(PhabricatorEventType::TYPE_ALL);
  18    }
  19  
  20    public function handleEvent(PhutilEvent $event) {
  21      if (self::$discardMode) {
  22        return;
  23      }
  24      self::$events[] = $event;
  25    }
  26  
  27  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1