1 | <?php |
||
50 | class Schedule extends AbstractAnnotation |
||
51 | { |
||
52 | |||
53 | /** |
||
54 | * The default number to append to an alias if a number is missing |
||
55 | * @var string |
||
56 | */ |
||
57 | const DEFAULT_NUMBER = '1'; |
||
58 | |||
59 | /** |
||
60 | * The aliases to be replaced with valid CRON values. |
||
61 | * |
||
62 | * @var array |
||
63 | */ |
||
64 | protected $aliases = array('EVERY' => '*', 'ZERO' => '0', 'SLASH' => '/'); |
||
65 | |||
66 | /** |
||
67 | * The day of month. |
||
68 | * |
||
69 | * @var string |
||
70 | */ |
||
71 | protected $dayOfMonth; |
||
72 | |||
73 | /** |
||
74 | * The day of week. |
||
75 | * |
||
76 | * @var string |
||
77 | */ |
||
78 | protected $dayOfWeek; |
||
79 | |||
80 | /** |
||
81 | * The end date time. |
||
82 | * |
||
83 | * @var string |
||
84 | */ |
||
85 | protected $end; |
||
86 | |||
87 | /** |
||
88 | * The the hour. |
||
89 | * |
||
90 | * @var string |
||
91 | */ |
||
92 | protected $hour; |
||
93 | |||
94 | /** |
||
95 | * The the minute. |
||
96 | * |
||
97 | * @var string |
||
98 | */ |
||
99 | protected $minute; |
||
100 | |||
101 | /** |
||
102 | * The the month. |
||
103 | * |
||
104 | * @var string |
||
105 | */ |
||
106 | protected $month; |
||
107 | |||
108 | /** |
||
109 | * The the second. |
||
110 | * |
||
111 | * @var string |
||
112 | */ |
||
113 | protected $second; |
||
114 | |||
115 | /** |
||
116 | * The start date time. |
||
117 | * |
||
118 | * @var string |
||
119 | */ |
||
120 | protected $start; |
||
121 | |||
122 | /** |
||
123 | * The the timezone. |
||
124 | * |
||
125 | * @var string |
||
126 | */ |
||
127 | protected $timezone; |
||
128 | |||
129 | /** |
||
130 | * The the year. |
||
131 | * |
||
132 | * @var string |
||
133 | */ |
||
134 | protected $year; |
||
135 | |||
136 | /** |
||
137 | * The constructor the initializes the instance with the |
||
138 | * data passed with the token. |
||
139 | * |
||
140 | * @param array $values The annotation values |
||
141 | */ |
||
142 | public function __construct(array $values = array()) |
||
209 | |||
210 | /** |
||
211 | * Returns day of month. |
||
212 | * |
||
213 | * @return string|null The day of month |
||
214 | */ |
||
215 | public function getDayOfMonth() |
||
219 | |||
220 | /** |
||
221 | * Returns day of week. |
||
222 | * |
||
223 | * @return string|null The day of week |
||
224 | */ |
||
225 | public function getDayOfWeek() |
||
229 | |||
230 | /** |
||
231 | * Returns end date time. |
||
232 | * |
||
233 | * @return string|null The last expiration date |
||
234 | */ |
||
235 | public function getEnd() |
||
239 | |||
240 | /** |
||
241 | * Returns the hour. |
||
242 | * |
||
243 | * @return string|null The hour |
||
244 | */ |
||
245 | public function getHour() |
||
249 | |||
250 | /** |
||
251 | * Returns the minute. |
||
252 | * |
||
253 | * @return string|null The minute |
||
254 | */ |
||
255 | public function getMinute() |
||
259 | |||
260 | /** |
||
261 | * Returns the month. |
||
262 | * |
||
263 | * @return string|null The month |
||
264 | */ |
||
265 | public function getMonth() |
||
269 | |||
270 | /** |
||
271 | * Returns the second. |
||
272 | * |
||
273 | * @return string|null The second |
||
274 | */ |
||
275 | public function getSecond() |
||
279 | |||
280 | /** |
||
281 | * Returns start date time. |
||
282 | * |
||
283 | * @return string|null The initial expiration date |
||
284 | */ |
||
285 | public function getStart() |
||
289 | |||
290 | /** |
||
291 | * Returns the timezone. |
||
292 | * |
||
293 | * @return null|string The timezone |
||
294 | */ |
||
295 | public function getTimezone() |
||
299 | |||
300 | /** |
||
301 | * Returns the year. |
||
302 | * |
||
303 | * @return string|null The year |
||
304 | */ |
||
305 | public function getYear() |
||
309 | |||
310 | /** |
||
311 | * Creates a new schedule expression instance from this annotations data. |
||
312 | * |
||
313 | * @return \AppserverIo\Psr\EnterpriseBeans\ScheduleExpression The expression initialzed with the data from this annotation |
||
314 | */ |
||
315 | public function toScheduleExpression() |
||
336 | } |
||
337 |