1 | <?php |
||
31 | class DocumentNotFoundEventArgs extends LifecycleEventArgs |
||
32 | { |
||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $identifier; |
||
37 | |||
38 | /** |
||
39 | * @var bool |
||
40 | */ |
||
41 | private $disableException = false; |
||
42 | |||
43 | /** |
||
44 | * Constructor. |
||
45 | * |
||
46 | * @param object $document |
||
47 | * @param DocumentManager $dm |
||
48 | * @param string $identifier |
||
49 | */ |
||
50 | 9 | public function __construct($document, DocumentManager $dm, $identifier) |
|
51 | { |
||
52 | 9 | parent::__construct($document, $dm); |
|
53 | 9 | $this->identifier = $identifier; |
|
54 | 9 | } |
|
55 | |||
56 | /** |
||
57 | * Retrieve associated identifier. |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getIdentifier() |
||
62 | { |
||
63 | return $this->identifier; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Indicates whether the proxy initialization exception is disabled. |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | 9 | public function isExceptionDisabled() |
|
75 | |||
76 | /** |
||
77 | * Disable the throwing of an exception |
||
78 | * |
||
79 | * This method indicates to the proxy initializer that the missing document |
||
80 | * has been handled and no exception should be thrown. This can't be reset. |
||
81 | * |
||
82 | * @param bool $disableException |
||
83 | */ |
||
84 | 1 | public function disableException($disableException = true) |
|
88 | } |
||
89 |