1 | 2 | simandl | <?php |
2 | | | |
3 | | | namespace Phem\Libraries\UI\Model; |
4 | | | |
5 | | | use JsonSerializable; |
6 | | | use Phem\Core\Object; |
7 | | | |
8 | | | /** |
9 | | | * |
10 | | | * @author kubapet |
11 | | | */ |
12 | | | class Change extends Object implements JsonSerializable |
13 | | | { |
14 | | | private $type; |
15 | | | private $data; |
16 | | | |
17 | | | private $objectName; |
18 | | | private $attrName; |
19 | | | |
20 | | | public function getType() |
21 | | | { |
22 | | | return $this->type; |
23 | | | } |
24 | | | |
25 | | | public function getData() |
26 | | | { |
27 | | | return $this->data; |
28 | | | } |
29 | | | |
30 | | | public function setType($type) |
31 | | | { |
32 | | | $this->type = $type; |
33 | | | } |
34 | | | |
35 | | | public function setData($data) |
36 | | | { |
37 | | | $this->data = $data; |
38 | | | } |
39 | | | |
40 | | | public function getObjectName() |
41 | | | { |
42 | | | return $this->objectName; |
43 | | | } |
44 | | | |
45 | | | public function getAttrName() |
46 | | | { |
47 | | | return $this->attrName; |
48 | | | } |
49 | | | |
50 | | | public function setObjectName($objectName) |
51 | | | { |
52 | | | $this->objectName = $objectName; |
53 | | | } |
54 | | | |
55 | | | public function setAttrName($attrName) |
56 | | | { |
57 | | | $this->attrName = $attrName; |
58 | | | } |
59 | | | |
60 | | | public function jsonSerialize() |
61 | | | { |
62 | | | return [ |
63 | | | 'type' => $this->type, |
64 | | | 'data' => $this->data, |
65 | | | 'objectName' => $this->objectName, |
66 | | | 'attrName' => $this->attrName, |
67 | | | ]; |
68 | | | } |
69 | | | |
70 | | | } |