Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F19491495
PhabricatorExampleEventListener.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
996 B
Referenced Files
None
Subscribers
None
PhabricatorExampleEventListener.php
View Options
<?php
/**
* Example event listener. For details about installing Phabricator event hooks,
* refer to @{article:Events User Guide: Installing Event Listeners}.
*/
final
class
PhabricatorExampleEventListener
extends
PhabricatorEventListener
{
public
function
register
()
{
// When your listener is installed, its register() method will be called.
// You should listen() to any events you are interested in here.
$this
->
listen
(
PhabricatorEventType
::
TYPE_TEST_DIDRUNTEST
);
}
public
function
handleEvent
(
PhutilEvent
$event
)
{
// When an event you have called listen() for in your register() method
// occurs, this method will be invoked. You should respond to the event.
// In this case, we just echo a message out so the event test script will
// do something visible.
$console
=
PhutilConsole
::
getConsole
();
$console
->
writeOut
(
"%s
\n
"
,
pht
(
'%s got test event at %d'
,
__CLASS__
,
$event
->
getValue
(
'time'
)));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Jan 10, 7:22 AM (7 h, 47 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8245776
Default Alt Text
PhabricatorExampleEventListener.php (996 B)
Attached To
Mode
rP Phabricator
Attached
Detach File
Event Timeline
Log In to Comment