PluginProbe
WANotifier for Forms and Actions / 3.0.0
WANotifier for Forms and Actions v3.0.0
3.1.1 3.1.0 3.0.4 2.7.10 2.7.11 2.7.12 2.7.13 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 3.0.0 3.0.1 3.0.2 3.0.3 trunk 0.1.0 0.1.1 1.0.0 1.0.1 1.0.2 All 67 releases
notifier / libraries / action-scheduler / classes / schedules / ActionScheduler_CanceledSchedule.php

ActionScheduler_CanceledSchedule.php in WANotifier for Forms and Actions 3.0.0, at libraries/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php

58 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Class ActionScheduler_SimpleSchedule
5 */
6 class ActionScheduler_CanceledSchedule extends ActionScheduler_SimpleSchedule {
7
8 /**
9 * Deprecated property @see $this->__wakeup() for details.
10 **/
11 private $timestamp = NULL;
12
13 /**
14 * @param DateTime $after
15 *
16 * @return DateTime|null
17 */
18 public function calculate_next( DateTime $after ) {
19 return null;
20 }
21
22 /**
23 * Cancelled actions should never have a next schedule, even if get_next()
24 * is called with $after < $this->scheduled_date.
25 *
26 * @param DateTime $after
27 * @return DateTime|null
28 */
29 public function get_next( DateTime $after ) {
30 return null;
31 }
32
33 /**
34 * @return bool
35 */
36 public function is_recurring() {
37 return false;
38 }
39
40 /**
41 * Unserialize recurring schedules serialized/stored prior to AS 3.0.0
42 *
43 * Prior to Action Scheduler 3.0.0, schedules used different property names to refer
44 * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
45 * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
46 * aligned properties and property names for better inheritance. To maintain backward
47 * compatibility with schedules serialized and stored prior to 3.0, we need to correctly
48 * map the old property names with matching visibility.
49 */
50 public function __wakeup() {
51 if ( ! is_null( $this->timestamp ) ) {
52 $this->scheduled_timestamp = $this->timestamp;
53 unset( $this->timestamp );
54 }
55 parent::__wakeup();
56 }
57 }
58