1 | <?php |
||
21 | trait RevisionTrait |
||
22 | { |
||
23 | /** |
||
24 | * Revision guid. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $revisionGuid; |
||
29 | |||
30 | /** |
||
31 | * Revision number. |
||
32 | * |
||
33 | * @var int|null |
||
34 | */ |
||
35 | protected $revisionNumber; |
||
36 | |||
37 | /** |
||
38 | * Revision type that can be 'single_user', or 'vote_based'. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $revisionType; |
||
43 | |||
44 | /** |
||
45 | * Sets revision guid. |
||
46 | * |
||
47 | * @param string $revisionGuid The revision guid |
||
48 | * |
||
49 | * @return $this self Object |
||
50 | */ |
||
51 | public function setRevisionGuid($revisionGuid) |
||
57 | |||
58 | /** |
||
59 | * Gets revision guid. |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getRevisionGuid() |
||
67 | |||
68 | /** |
||
69 | * Sets revision number. |
||
70 | * |
||
71 | * @param int|null $revisionNumber The revision number |
||
72 | * |
||
73 | * @return $this self Object |
||
74 | */ |
||
75 | public function setRevisionNumber($revisionNumber) |
||
81 | |||
82 | /** |
||
83 | * Gets revision number. |
||
84 | * |
||
85 | * @return int|null |
||
86 | */ |
||
87 | public function getRevisionNumber() |
||
91 | |||
92 | /** |
||
93 | * Sets revision type. |
||
94 | * |
||
95 | * @param string $revisionType The revision that can be 'single_user', or 'vote_based' |
||
96 | * |
||
97 | * @return $this self Object |
||
98 | */ |
||
99 | public function setRevisionType($revisionType) |
||
107 | |||
108 | /** |
||
109 | * Gets revision type. |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | public function getRevisionType() |
||
117 | |||
118 | /** |
||
119 | * Loads the variables if the data exist into resource. It works like a constructor. |
||
120 | * |
||
121 | * @param null|mixed[] $resource The resource |
||
122 | * @param string[] $constants The array of constants |
||
123 | */ |
||
124 | protected function loadRevision($resource, $constants) |
||
130 | } |
||
131 |