1 | <?php |
||
36 | class ScheduleExpression implements \Serializable |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The date format we use to serialize/unserialize \DateTime properties. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | const DATE_FORMAT = 'Y-m-d H:i:s'; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | private $dayOfMonth = "*"; |
||
50 | |||
51 | /** |
||
52 | * @var string |
||
53 | */ |
||
54 | private $dayOfWeek = "*"; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | */ |
||
59 | private $end; |
||
60 | |||
61 | /** |
||
62 | * @var string |
||
63 | */ |
||
64 | private $hour = "0"; |
||
65 | |||
66 | /** |
||
67 | * @var string |
||
68 | */ |
||
69 | private $minute = "0"; |
||
70 | |||
71 | /** |
||
72 | * @var string |
||
73 | */ |
||
74 | private $month = "*"; |
||
75 | |||
76 | /** |
||
77 | * @var string |
||
78 | */ |
||
79 | private $second = "0"; |
||
80 | |||
81 | /** |
||
82 | * @var string |
||
83 | */ |
||
84 | private $start; |
||
85 | |||
86 | /** |
||
87 | * @var string |
||
88 | */ |
||
89 | private $timezone = ""; |
||
90 | |||
91 | /** |
||
92 | * @var string |
||
93 | */ |
||
94 | private $year = "*"; |
||
95 | |||
96 | /** |
||
97 | * String representation of object. |
||
98 | * |
||
99 | * @return string the string representation of the object or null |
||
100 | * @link http://php.net/manual/en/serializable.serialize.php |
||
101 | */ |
||
102 | public function serialize() |
||
106 | |||
107 | /** |
||
108 | * Constructs the object |
||
109 | * |
||
110 | * @param string $data The string representation of the object |
||
111 | * |
||
112 | * @return void |
||
113 | * @link http://php.net/manual/en/serializable.unserialize.php |
||
114 | */ |
||
115 | public function unserialize($data) |
||
121 | |||
122 | /** |
||
123 | * Sets the day of month |
||
124 | * |
||
125 | * @param String $dayOfMonth The string |
||
126 | * |
||
127 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
128 | */ |
||
129 | public function dayOfMonth($dayOfMonth) |
||
134 | |||
135 | /** |
||
136 | * Sets the day of week |
||
137 | * |
||
138 | * @param int|string $dayOfWeek The day of week |
||
139 | * |
||
140 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
141 | */ |
||
142 | public function dayOfWeek($dayOfWeek) |
||
147 | |||
148 | /** |
||
149 | * Sets the day of week. |
||
150 | * |
||
151 | * @param string $end The end date time |
||
152 | * |
||
153 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
154 | */ |
||
155 | public function end($end) |
||
160 | |||
161 | /** |
||
162 | * Returns day of month. |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getDayOfMonth() |
||
170 | |||
171 | /** |
||
172 | * Returns day of week. |
||
173 | * |
||
174 | * @return string |
||
175 | */ |
||
176 | public function getDayOfWeek() |
||
180 | |||
181 | /** |
||
182 | * Returns end datetime. |
||
183 | * |
||
184 | * @return string |
||
185 | */ |
||
186 | public function getEnd() |
||
190 | |||
191 | /** |
||
192 | * Returns hour. |
||
193 | * |
||
194 | * @return string |
||
195 | */ |
||
196 | public function getHour() |
||
200 | |||
201 | /** |
||
202 | * Returns minute. |
||
203 | * |
||
204 | * @return string |
||
205 | */ |
||
206 | public function getMinute() |
||
210 | |||
211 | /** |
||
212 | * Returns month. |
||
213 | * |
||
214 | * @return string |
||
215 | */ |
||
216 | 1 | public function getMonth() |
|
220 | |||
221 | /** |
||
222 | * Returns second. |
||
223 | * |
||
224 | * @return string |
||
225 | */ |
||
226 | public function getSecond() |
||
230 | |||
231 | /** |
||
232 | * Returns start date time. |
||
233 | * |
||
234 | * @return string |
||
235 | */ |
||
236 | public function getStart() |
||
240 | |||
241 | /** |
||
242 | * Returns the timezone. |
||
243 | * |
||
244 | * @return null|string |
||
245 | */ |
||
246 | public function getTimezone() |
||
256 | |||
257 | /** |
||
258 | * Returns the year. |
||
259 | * |
||
260 | * @return string |
||
261 | */ |
||
262 | public function getYear() |
||
266 | |||
267 | /** |
||
268 | * Sets the hour. |
||
269 | * |
||
270 | * @param int|string $hour the hour to set |
||
271 | * |
||
272 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
273 | */ |
||
274 | public function hour($hour) |
||
279 | |||
280 | /** |
||
281 | * Sets the minute. |
||
282 | * |
||
283 | * @param int|string $minute The minute to set |
||
284 | * |
||
285 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
286 | */ |
||
287 | public function minute($minute) |
||
292 | |||
293 | /** |
||
294 | * Sets the month. |
||
295 | * |
||
296 | * @param int|string $month The month to set |
||
297 | * |
||
298 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
299 | */ |
||
300 | 1 | public function month($month) |
|
305 | |||
306 | /** |
||
307 | * Sets the second. |
||
308 | * |
||
309 | * @param int|string $second The second to set |
||
310 | * |
||
311 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
312 | */ |
||
313 | public function second($second) |
||
318 | |||
319 | /** |
||
320 | * Sets the start date time. |
||
321 | * |
||
322 | * @param string $start The start date time to set |
||
323 | * |
||
324 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
325 | */ |
||
326 | public function start($start) |
||
331 | |||
332 | /** |
||
333 | * Sets the timezone. |
||
334 | * |
||
335 | * @param int|string $timezone The timezone to set |
||
336 | * |
||
337 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
338 | */ |
||
339 | public function timezone($timezone) |
||
344 | |||
345 | /** |
||
346 | * Sets the year. |
||
347 | * |
||
348 | * @param int|string $year The year to set |
||
349 | * |
||
350 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression |
||
351 | */ |
||
352 | public function year($year) |
||
357 | |||
358 | /** |
||
359 | * Renders the object to string. |
||
360 | * |
||
361 | * @return string |
||
362 | */ |
||
363 | public function __toString() |
||
390 | } |
||
391 |