Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2983602
PhabricatorExampleEventListener.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
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
Thu, Feb 20, 19:13 (2 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1144452
Default Alt Text
PhabricatorExampleEventListener.php (996 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment