403Webshell
Server IP : 172.67.158.161  /  Your IP : 3.144.9.172
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/thietke365.net/wp-content/plugins/mailpoet/vendor/woocommerce/action-scheduler/classes/schedules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/thietke365.net/wp-content/plugins/mailpoet/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php
<?php
if (!defined('ABSPATH')) exit;
class ActionScheduler_CronSchedule extends ActionScheduler_Abstract_RecurringSchedule implements ActionScheduler_Schedule {
 private $start_timestamp = NULL;
 private $cron = NULL;
 public function __construct( DateTime $start, $recurrence, DateTime $first = null ) {
 if ( ! is_a( $recurrence, 'CronExpression' ) ) {
 $recurrence = CronExpression::factory( $recurrence );
 }
 // For backward compatibility, we need to make sure the date is set to the first matching cron date, not whatever date is passed in. Importantly, by passing true as the 3rd param, if $start matches the cron expression, then it will be used. This was previously handled in the now deprecated next() method.
 $date = $recurrence->getNextRunDate( $start, 0, true );
 // parent::__construct() will set this to $date by default, but that may be different to $start now.
 $first = empty( $first ) ? $start : $first;
 parent::__construct( $date, $recurrence, $first );
 }
 protected function calculate_next( DateTime $after ) {
 return $this->recurrence->getNextRunDate( $after, 0, false );
 }
 public function get_recurrence() {
 return strval( $this->recurrence );
 }
 public function __sleep() {
 $sleep_params = parent::__sleep();
 $this->start_timestamp = $this->scheduled_timestamp;
 $this->cron = $this->recurrence;
 return array_merge( $sleep_params, array(
 'start_timestamp',
 'cron'
 ) );
 }
 public function __wakeup() {
 if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) {
 $this->scheduled_timestamp = $this->start_timestamp;
 unset( $this->start_timestamp );
 }
 if ( is_null( $this->recurrence ) && ! is_null( $this->cron ) ) {
 $this->recurrence = $this->cron;
 unset( $this->cron );
 }
 parent::__wakeup();
 }
}

Youez - 2016 - github.com/yon3zu
LinuXploit