| 1 | 2 | simandl | <?php |
| 2 | | | |
| 3 | | | namespace Phem\Libraries\UI\Model; |
| 4 | | | |
| 5 | | | use JsonSerializable; |
| 6 | | | |
| 7 | | | /** |
| 8 | | | * @author Jakub PetrĹžĂlka <petrzilka@czweb.net> |
| 9 | | | */ |
| 10 | | | class EventResult implements JsonSerializable |
| 11 | | | { |
| 12 | | | |
| 13 | | | private $changes; |
| 14 | | | private $version; |
| 15 | | | private $invokedBy; |
| 16 | | | |
| 17 | | | function __construct($changes, $version) |
| 18 | | | { |
| 19 | | | $this->changes = $changes; |
| 20 | | | $this->version = $version; |
| 21 | | | } |
| 22 | | | |
| 23 | | | public function getChanges() |
| 24 | | | { |
| 25 | | | return $this->changes; |
| 26 | | | } |
| 27 | | | |
| 28 | | | public function getVersion() |
| 29 | | | { |
| 30 | | | return $this->version; |
| 31 | | | } |
| 32 | | | |
| 33 | | | public function setChanges($changes) |
| 34 | | | { |
| 35 | | | $this->changes = $changes; |
| 36 | | | } |
| 37 | | | |
| 38 | | | public function setVersion($version) |
| 39 | | | { |
| 40 | | | $this->version = $version; |
| 41 | | | } |
| 42 | | | |
| 43 | | | public function getInvokedBy() |
| 44 | | | { |
| 45 | | | return $this->invokedBy; |
| 46 | | | } |
| 47 | | | |
| 48 | | | public function setInvokedBy($invokedBy) |
| 49 | | | { |
| 50 | | | $this->invokedBy = $invokedBy; |
| 51 | | | } |
| 52 | | | |
| 53 | | | public function jsonSerialize() |
| 54 | | | { |
| 55 | | | return [ |
| 56 | | | 'changes' => $this->changes, |
| 57 | | | 'version' => $this->version, |
| 58 | | | 'invokedBy' => $this->invokedBy, |
| 59 | | | ]; |
| 60 | | | } |
| 61 | | | |
| 62 | | | } |