Merge pull request #15978 from civicrm/5.20
[civicrm-core.git] / Civi / Core / Event / UnhandledExceptionEvent.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 namespace Civi\Core\Event;
13
14 /**
15 * Class UnhandledExceptionEvent
16 * @package Civi\API\Event
17 */
18 class UnhandledExceptionEvent extends GenericHookEvent {
19
20 /**
21 * @var \Exception
22 */
23 public $exception;
24
25 /**
26 * @var mixed reserved for future use
27 */
28 public $request;
29
30 /**
31 * @param $e
32 * @param $request
33 */
34 public function __construct($e, $request) {
35 $this->request = $request;
36 $this->exception = $e;
37 }
38
39 /**
40 * @inheritDoc
41 */
42 public function getHookValues() {
43 return [$this->exception, $this->request];
44 }
45
46 }