This commit is contained in:
Prospress Inc
2016-09-08 09:19:32 +02:00
committed by I
parent 084aa2976e
commit 3c13d0a95f
26 changed files with 776 additions and 483 deletions

View File

@@ -7,7 +7,7 @@ class ActionScheduler_SimpleSchedule implements ActionScheduler_Schedule {
private $date = NULL;
private $timestamp = 0;
public function __construct( DateTime $date ) {
$this->date = clone($date);
$this->date = clone $date;
}
/**
@@ -16,8 +16,8 @@ class ActionScheduler_SimpleSchedule implements ActionScheduler_Schedule {
* @return DateTime|null
*/
public function next( DateTime $after = NULL ) {
$after = empty($after) ? new DateTime('@0') : $after;
return ( $after > $this->date ) ? NULL : clone( $this->date );
$after = empty($after) ? as_get_datetime_object('@0') : $after;
return ( $after > $this->date ) ? NULL : clone $this->date;
}
/**
@@ -32,7 +32,7 @@ class ActionScheduler_SimpleSchedule implements ActionScheduler_Schedule {
}
public function __wakeup() {
$this->date = new DateTime('@'.$this->timestamp);
$this->date = as_get_datetime_object($this->timestamp);
}
}