PHP Класс Cron\Schedule\CrontabSchedule

Автор: Dries De Peuter ([email protected])
Наследование: implements Cron\Schedule\ScheduleInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( null $pattern = null )
getPattern ( ) : string
setPattern ( string $pattern )
valid ( DateTime $now ) : boolean Validate if this pattern can run on the given date.

Защищенные методы

Метод Описание
checkDay ( DateTime $now ) : boolean | null Check if the day matches.
checkDayOfWeek ( DateTime $now ) : boolean | null Check if the day of the week matches.
checkHour ( DateTime $now ) : boolean | null Check if the hour matches.
checkMinute ( DateTime $now ) : boolean | null Check if the minute matches.
checkMonth ( DateTime $now ) : boolean | null Check if the month matches.
checkPart ( string $partName, integer $min, integer $max, array $formats, DateTime $now ) : boolean | null
parsePattern ( string $pattern ) : string[] Parse the pattern into a rule for every property.
parseRule ( string $rule, integer $min, integer $max ) : array Convert a rule to an array of all its values.

Описание методов

__construct() публичный Метод

public __construct ( null $pattern = null )
$pattern null

checkDay() защищенный Метод

Check if the day matches.
protected checkDay ( DateTime $now ) : boolean | null
$now DateTime
Результат boolean | null

checkDayOfWeek() защищенный Метод

Check if the day of the week matches.
protected checkDayOfWeek ( DateTime $now ) : boolean | null
$now DateTime
Результат boolean | null

checkHour() защищенный Метод

Check if the hour matches.
protected checkHour ( DateTime $now ) : boolean | null
$now DateTime
Результат boolean | null

checkMinute() защищенный Метод

Check if the minute matches.
protected checkMinute ( DateTime $now ) : boolean | null
$now DateTime
Результат boolean | null

checkMonth() защищенный Метод

Check if the month matches.
protected checkMonth ( DateTime $now ) : boolean | null
$now DateTime
Результат boolean | null

checkPart() защищенный Метод

protected checkPart ( string $partName, integer $min, integer $max, array $formats, DateTime $now ) : boolean | null
$partName string
$min integer
$max integer
$formats array
$now DateTime
Результат boolean | null

getPattern() публичный Метод

public getPattern ( ) : string
Результат string

parsePattern() защищенный Метод

Parse the pattern into a rule for every property.
protected parsePattern ( string $pattern ) : string[]
$pattern string
Результат string[]

parseRule() защищенный Метод

Convert a rule to an array of all its values.
protected parseRule ( string $rule, integer $min, integer $max ) : array
$rule string
$min integer
$max integer
Результат array

setPattern() публичный Метод

public setPattern ( string $pattern )
$pattern string

valid() публичный Метод

Validate if this pattern can run on the given date.
public valid ( DateTime $now ) : boolean
$now DateTime
Результат boolean