Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/events/PhabricatorExampleEventListener.php
| Show All 15 Lines | public function handleEvent(PhutilEvent $event) { | ||||
| // When an event you have called listen() for in your register() method | // When an event you have called listen() for in your register() method | ||||
| // occurs, this method will be invoked. You should respond to the event. | // 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 | // In this case, we just echo a message out so the event test script will | ||||
| // do something visible. | // do something visible. | ||||
| $console = PhutilConsole::getConsole(); | $console = PhutilConsole::getConsole(); | ||||
| $console->writeOut( | $console->writeOut( | ||||
| "PhabricatorExampleEventListener got test event at %d\n", | "%s\n", | ||||
| $event->getValue('time')); | pht( | ||||
| '% got test event at %d', | |||||
| __CLASS__, | |||||
| $event->getValue('time'))); | |||||
| } | } | ||||
| } | } | ||||