| 1 | <?php |
||
| 14 | class Event extends \Symfony\Component\EventDispatcher\Event |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var mixed $target target object, on which event is fired |
||
| 18 | */ |
||
| 19 | private $target; |
||
| 20 | |||
| 21 | private $cancelled = false; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Set target object, on which event is fired |
||
| 25 | * @param mixed $target |
||
| 26 | * @return \Sokil\Mongo\Event |
||
| 27 | */ |
||
| 28 | public function setTarget($target) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get target object, on which event is fired |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public function getTarget() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Check if operation execution cancelled |
||
| 45 | */ |
||
| 46 | public function isCancelled() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Cancel related operation execution. If called as beforeInsert |
||
| 53 | * handler, than insert will be cancelled. |
||
| 54 | */ |
||
| 55 | public function cancel() |
||
| 64 | } |
||
| 65 |