plugin updates

This commit is contained in:
Tony Volpe
2024-11-15 13:53:04 -05:00
parent 1293d604ca
commit 0238f0c4ca
2009 changed files with 163492 additions and 89543 deletions

View File

@@ -7,11 +7,13 @@ class ActionScheduler_CanceledSchedule extends ActionScheduler_SimpleSchedule {
/**
* Deprecated property @see $this->__wakeup() for details.
**/
*
* @var null
*/
private $timestamp = NULL;
/**
* @param DateTime $after
* @param DateTime $after Timestamp.
*
* @return DateTime|null
*/
@@ -23,7 +25,7 @@ class ActionScheduler_CanceledSchedule extends ActionScheduler_SimpleSchedule {
* Cancelled actions should never have a next schedule, even if get_next()
* is called with $after < $this->scheduled_date.
*
* @param DateTime $after
* @param DateTime $after Timestamp.
* @return DateTime|null
*/
public function get_next( DateTime $after ) {

View File

@@ -7,21 +7,25 @@ class ActionScheduler_CronSchedule extends ActionScheduler_Abstract_RecurringSch
/**
* Deprecated property @see $this->__wakeup() for details.
**/
*
* @var null
*/
private $start_timestamp = NULL;
/**
* Deprecated property @see $this->__wakeup() for details.
**/
*
* @var null
*/
private $cron = NULL;
/**
* Wrapper for parent constructor to accept a cron expression string and map it to a CronExpression for this
* objects $recurrence property.
*
* @param DateTime $start The date & time to run the action at or after. If $start aligns with the CronSchedule passed via $recurrence, it will be used. If it does not align, the first matching date after it will be used.
* @param DateTime $start The date & time to run the action at or after. If $start aligns with the CronSchedule passed via $recurrence, it will be used. If it does not align, the first matching date after it will be used.
* @param CronExpression|string $recurrence The CronExpression used to calculate the schedule's next instance.
* @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance.
* @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance.
*/
public function __construct( DateTime $start, $recurrence, DateTime $first = null ) {
if ( ! is_a( $recurrence, 'CronExpression' ) ) {
@@ -41,7 +45,7 @@ class ActionScheduler_CronSchedule extends ActionScheduler_Abstract_RecurringSch
* Calculate when an instance of this schedule would start based on a given
* date & time using its the CronExpression.
*
* @param DateTime $after
* @param DateTime $after Timestamp.
* @return DateTime
*/
protected function calculate_next( DateTime $after ) {

View File

@@ -7,19 +7,23 @@ class ActionScheduler_IntervalSchedule extends ActionScheduler_Abstract_Recurrin
/**
* Deprecated property @see $this->__wakeup() for details.
**/
*
* @var null
*/
private $start_timestamp = NULL;
/**
* Deprecated property @see $this->__wakeup() for details.
**/
*
* @var null
*/
private $interval_in_seconds = NULL;
/**
* Calculate when this schedule should start after a given date & time using
* the number of seconds between recurrences.
*
* @param DateTime $after
* @param DateTime $after Timestamp.
* @return DateTime
*/
protected function calculate_next( DateTime $after ) {

View File

@@ -11,7 +11,7 @@ class ActionScheduler_NullSchedule extends ActionScheduler_SimpleSchedule {
/**
* Make the $date param optional and default to null.
*
* @param null $date The date & time to run the action.
* @param null|DateTime $date The date & time to run the action.
*/
public function __construct( DateTime $date = null ) {
$this->scheduled_date = null;
@@ -25,6 +25,9 @@ class ActionScheduler_NullSchedule extends ActionScheduler_SimpleSchedule {
return array();
}
/**
* Wakeup.
*/
public function __wakeup() {
$this->scheduled_date = null;
}

View File

@@ -5,7 +5,7 @@
*/
interface ActionScheduler_Schedule {
/**
* @param DateTime $after
* @param null|DateTime $after Timestamp.
* @return DateTime|null
*/
public function next( DateTime $after = NULL );
@@ -15,4 +15,3 @@ interface ActionScheduler_Schedule {
*/
public function is_recurring();
}

View File

@@ -7,11 +7,13 @@ class ActionScheduler_SimpleSchedule extends ActionScheduler_Abstract_Schedule {
/**
* Deprecated property @see $this->__wakeup() for details.
**/
*
* @var null|DateTime
*/
private $timestamp = NULL;
/**
* @param DateTime $after
* @param DateTime $after Timestamp.
*
* @return DateTime|null
*/