| 1 | <?php |
||
| 8 | class StubEventSubscriber implements EventSubscriberInterface |
||
| 9 | { |
||
| 10 | protected $preJobCalled; |
||
| 11 | protected $postJobCalled; |
||
| 12 | |||
| 13 | public function preJob(Event $event) |
||
| 14 | { |
||
| 15 | $this->preJobCalled[] = $event; |
||
| 16 | } |
||
| 17 | |||
| 18 | public function postJob(Event $event) |
||
| 19 | { |
||
| 20 | $this->postJobCalled[] = $event; |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getPreJobCalled() |
||
| 24 | { |
||
| 25 | return $this->preJobCalled; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getPostJobCalled() |
||
| 29 | { |
||
| 30 | return $this->postJobCalled; |
||
| 31 | } |
||
| 32 | |||
| 33 | public static function getSubscribedEvents() |
||
| 34 | { |
||
| 35 | return [ |
||
| 36 | Event::PRE_JOB => 'preJob', |
||
| 37 | Event::POST_JOB => 'postJob', |
||
| 38 | ]; |
||
| 39 | } |
||
| 40 | } |
||
| 41 |