Documentation

FieldInterface

CRON field interface

Table of Contents

increment()  : FieldInterface
When a CRON expression is not satisfied, this method is used to increment or decrement a DateTime object by the unit of the cron field
isSatisfiedBy()  : bool
Check if the respective value of a DateTime field satisfies a CRON exp
validate()  : bool
Validates a CRON expression for a given field

Methods

increment()

When a CRON expression is not satisfied, this method is used to increment or decrement a DateTime object by the unit of the cron field

public increment(DateTime $date[, bool $invert = false ]) : FieldInterface
Parameters
$date : DateTime

DateTime object to change

$invert : bool = false

(optional) Set to TRUE to decrement

Return values
FieldInterface

isSatisfiedBy()

Check if the respective value of a DateTime field satisfies a CRON exp

public isSatisfiedBy(DateTime $date, string $value) : bool
Parameters
$date : DateTime

DateTime object to check

$value : string

CRON expression to test against

Return values
bool

Returns TRUE if satisfied, FALSE otherwise

validate()

Validates a CRON expression for a given field

public validate(string $value) : bool
Parameters
$value : string

CRON expression value to validate

Return values
bool

Returns TRUE if valid, FALSE otherwise

Search results