PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.3
Booking for Appointments and Events Calendar – Amelia v2.3
2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Application / Commands / CommandResult.php
ameliabooking / src / Application / Commands Last commit date
Bookable 3 months ago Booking 2 months ago Calendar 2 months ago Entities 2 months ago Google 3 months ago Import 3 months ago Notification 5 months ago Payment 2 months ago QrCode 3 months ago Settings 2 months ago Square 6 months ago Stash 6 months ago Stats 6 months ago Test 6 months ago User 2 months ago WhatsNew 3 months ago Command.php 3 months ago CommandHandler.php 7 years ago CommandResult.php 5 months ago SortParamsTrait.php 4 months ago
CommandResult.php
158 lines
1 <?php
2
3 /**
4 * Class for standardizing command results
5 */
6
7 namespace AmeliaBooking\Application\Commands;
8
9 /**
10 * Class CommandResult
11 *
12 * @package AmeliaBooking\Application\Commands
13 */
14 class CommandResult
15 {
16 public const RESULT_SUCCESS = 'success';
17 public const RESULT_ERROR = 'error';
18 public const RESULT_CONFLICT = 'conflict';
19
20 private $data;
21 private $message;
22
23 private $result = self::RESULT_SUCCESS;
24
25 private $attachment = false;
26 private $file = null;
27 private $url;
28 private $dataInResponse = true;
29 private ?string $html = null;
30
31 /**
32 * @return string
33 */
34 public function getResult()
35 {
36 return $this->result;
37 }
38
39 /**
40 * @param string $result
41 */
42 public function setResult($result)
43 {
44 $this->result = $result;
45 }
46
47 /**
48 * @return mixed
49 */
50 public function getData()
51 {
52 return $this->data;
53 }
54
55 /**
56 * @param mixed $data
57 */
58 public function setData($data)
59 {
60 $this->data = $data;
61 }
62
63 /**
64 * @return mixed
65 */
66 public function getMessage()
67 {
68 return $this->message;
69 }
70
71 /**
72 * @param mixed $message
73 */
74 public function setMessage($message)
75 {
76 $this->message = $message;
77 }
78
79 /**
80 * @return mixed
81 */
82 public function hasAttachment()
83 {
84 return $this->attachment;
85 }
86
87 /**
88 * @param mixed $attachment
89 */
90 public function setAttachment($attachment)
91 {
92 $this->attachment = $attachment;
93 }
94
95 /**
96 * @return mixed
97 */
98 public function getUrl()
99 {
100 return $this->url;
101 }
102
103 /**
104 * @param mixed $url
105 */
106 public function setUrl($url)
107 {
108 $this->url = $url;
109 }
110
111 /**
112 * @param mixed $file
113 */
114 public function setFile($file)
115 {
116 $this->file = $file;
117 }
118
119 /**
120 * @return mixed
121 */
122 public function getFile()
123 {
124 return $this->file;
125 }
126
127 /**
128 * @return string
129 */
130 public function getHtml()
131 {
132 return $this->html;
133 }
134
135 public function setHtml(string $html): CommandResult
136 {
137 $this->html = $html;
138
139 return $this;
140 }
141
142 /**
143 * @return mixed
144 */
145 public function hasDataInResponse()
146 {
147 return $this->dataInResponse;
148 }
149
150 /**
151 * @param mixed $dataInResponse
152 */
153 public function setDataInResponse($dataInResponse)
154 {
155 $this->dataInResponse = $dataInResponse;
156 }
157 }
158