\CronFieldInterface

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) : boolean

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

boolean —

Returns TRUE if satisfied, FALSE otherwise

increment()

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

boolean $invert

(optional) Set to TRUE to decrement

Returns

\Cron\FieldInterface

validate()

validate(string  $value) : boolean

Validates a CRON expression for a given field

Parameters

string $value

CRON expression value to validate

Returns

boolean —

Returns TRUE if valid, FALSE otherwise