Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99123796
DarkConsoleEventPluginAPI.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 20, 17:21
Size
563 B
Mime Type
text/x-php
Expires
Wed, Jan 22, 17:21 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23710436
Attached To
rPH Phabricator
DarkConsoleEventPluginAPI.php
View Options
<?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
;
}
}
Event Timeline
Log In to Comment