Summary: - Removed trailing newlines. - Added newline at EOF. - Removed leading newlines. - Trimmed trailing whitespace. - Spelling fix. - Added newline at EOF Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: hach-que, chad, Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8344
31 lines
562 B
PHP
31 lines
562 B
PHP
<?php
|
|
|
|
/**
|
|
* @group console
|
|
*/
|
|
final class DarkConsoleEventPluginAPI extends PhabricatorEventListener {
|
|
|
|
private static $events = array();
|
|
private static $discardMode = false;
|
|
|
|
public static function enableDiscardMode() {
|
|
self::$discardMode = true;
|
|
}
|
|
|
|
public static function getEvents() {
|
|
return self::$events;
|
|
}
|
|
|
|
public function register() {
|
|
$this->listen(PhabricatorEventType::TYPE_ALL);
|
|
}
|
|
|
|
public function handleEvent(PhutilEvent $event) {
|
|
if (self::$discardMode) {
|
|
return;
|
|
}
|
|
self::$events[] = $event;
|
|
}
|
|
|
|
}
|