\CronExpression_FieldInterface

CRON field interface

Summary

Methods
Constants
isSatisfiedBy()
increment()
validate()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

isSatisfiedBy()

isSatisfiedBy(\DateTime  $date, string  $value) : bool

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

Parameters

\DateTime $date

DateTime object to check

string $value

CRON expression to test against

Returns

bool —

Returns TRUE if satisfied, FALSE otherwise

increment()

increment(\DateTime  $date, bool  $invert = false) : \CronExpression_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

Parameters

\DateTime $date

DateTime object to change

bool $invert

(optional) Set to TRUE to decrement

Returns

\CronExpression_FieldInterface

validate()

validate(string  $value) : bool

Validates a CRON expression for a given field

Parameters

string $value

CRON expression value to validate

Returns

bool —

Returns TRUE if valid, FALSE otherwise