PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.5.1
JetFormBuilder — Dynamic Blocks Form Builder v3.6.5.1
3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / vendor / woocommerce / action-scheduler / classes / abstracts / ActionScheduler_Abstract_Schedule.php
jetformbuilder / vendor / woocommerce / action-scheduler / classes / abstracts Last commit date
ActionScheduler.php 1 month ago ActionScheduler_Abstract_ListTable.php 1 year ago ActionScheduler_Abstract_QueueRunner.php 1 month ago ActionScheduler_Abstract_RecurringSchedule.php 1 year ago ActionScheduler_Abstract_Schedule.php 1 year ago ActionScheduler_Abstract_Schema.php 1 year ago ActionScheduler_Lock.php 1 year ago ActionScheduler_Logger.php 1 year ago ActionScheduler_Store.php 1 year ago ActionScheduler_TimezoneHelper.php 1 year ago ActionScheduler_WPCLI_Command.php 1 year ago
ActionScheduler_Abstract_Schedule.php
90 lines
1 <?php
2
3 /**
4 * Class ActionScheduler_Abstract_Schedule
5 */
6 abstract class ActionScheduler_Abstract_Schedule extends ActionScheduler_Schedule_Deprecated {
7
8 /**
9 * The date & time the schedule is set to run.
10 *
11 * @var DateTime
12 */
13 private $scheduled_date = null;
14
15 /**
16 * Timestamp equivalent of @see $this->scheduled_date
17 *
18 * @var int
19 */
20 protected $scheduled_timestamp = null;
21
22 /**
23 * Construct.
24 *
25 * @param DateTime $date The date & time to run the action.
26 */
27 public function __construct( DateTime $date ) {
28 $this->scheduled_date = $date;
29 }
30
31 /**
32 * Check if a schedule should recur.
33 *
34 * @return bool
35 */
36 abstract public function is_recurring();
37
38 /**
39 * Calculate when the next instance of this schedule would run based on a given date & time.
40 *
41 * @param DateTime $after Start timestamp.
42 * @return DateTime
43 */
44 abstract protected function calculate_next( DateTime $after );
45
46 /**
47 * Get the next date & time when this schedule should run after a given date & time.
48 *
49 * @param DateTime $after Start timestamp.
50 * @return DateTime|null
51 */
52 public function get_next( DateTime $after ) {
53 $after = clone $after;
54 if ( $after > $this->scheduled_date ) {
55 $after = $this->calculate_next( $after );
56 return $after;
57 }
58 return clone $this->scheduled_date;
59 }
60
61 /**
62 * Get the date & time the schedule is set to run.
63 *
64 * @return DateTime|null
65 */
66 public function get_date() {
67 return $this->scheduled_date;
68 }
69
70 /**
71 * For PHP 5.2 compat, because DateTime objects can't be serialized
72 *
73 * @return array
74 */
75 public function __sleep() {
76 $this->scheduled_timestamp = $this->scheduled_date->getTimestamp();
77 return array(
78 'scheduled_timestamp',
79 );
80 }
81
82 /**
83 * Wakeup.
84 */
85 public function __wakeup() {
86 $this->scheduled_date = as_get_datetime_object( $this->scheduled_timestamp );
87 unset( $this->scheduled_timestamp );
88 }
89 }
90