mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
tweaked library to work with codeigniter
This commit is contained in:
@@ -86,14 +86,14 @@ class CronExpression {
|
||||
|
||||
/**
|
||||
* @param string $expression a cron expression, e.g. "* * * * *"
|
||||
* @param DateTimeZone|null $timeZone time zone object
|
||||
* @param DateTimeZone|null $timeZone time zone objectstring $expression, DateTimeZone $timeZone = null
|
||||
*/
|
||||
public function __construct(string $expression, DateTimeZone $timeZone = null) {
|
||||
$this->timeZone = $timeZone;
|
||||
$this->expression = $expression;
|
||||
public function __construct($data) {
|
||||
$this->timeZone = $data['timeZone'];
|
||||
$this->expression = $data['expression'];
|
||||
|
||||
try {
|
||||
$this->registers = $this->parse($expression);
|
||||
$this->registers = $this->parse($data['expression']);
|
||||
} catch (Exception $e) {
|
||||
$this->registers = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user