Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
DeliveryRemovedEvent | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
jsonSerialize | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; under version 2 |
7 | * of the License (non-upgradable). |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | * Copyright (c) 2016 (original work) Open Assessment Technologies SA |
19 | * |
20 | */ |
21 | |
22 | namespace oat\taoDeliveryRdf\model\event; |
23 | |
24 | use JsonSerializable; |
25 | use oat\oatbox\event\Event; |
26 | |
27 | class DeliveryRemovedEvent extends AbstractDeliveryEvent |
28 | { |
29 | /** |
30 | * @param String $deliveryUri |
31 | */ |
32 | public function __construct($deliveryUri) |
33 | { |
34 | $this->deliveryUri = $deliveryUri; |
35 | } |
36 | |
37 | |
38 | /** |
39 | * Return a unique name for this event |
40 | * @see \oat\oatbox\event\Event::getName() |
41 | */ |
42 | public function getName() |
43 | { |
44 | return get_class($this); |
45 | } |
46 | |
47 | /** |
48 | * Specify data which should be serialized to JSON |
49 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
50 | * @return mixed data which can be serialized by <b>json_encode</b>, |
51 | * which is a value of any type other than a resource. |
52 | * @since 5.4.0 |
53 | */ |
54 | public function jsonSerialize() |
55 | { |
56 | return [ |
57 | 'delivery' => $this->deliveryUri |
58 | ]; |
59 | } |
60 | } |