Menu

## CronExpression_FieldInterface
in

CronExpression_FieldInterface.php : 8

CRON field interface

##### Tags

author

  Michael Dowling mtdowling@gmail.com

### Table of Contents

increment() : 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
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()

CronExpression_FieldInterface.php : 29

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 ]) : CronExpression_FieldInterface`

##### Parameters

$date : DateTime

  DateTime object to change

$invert : bool = false

  (optional) Set to TRUE to decrement

##### Return values

CronExpression_FieldInterface —

#### isSatisfiedBy()

CronExpression_FieldInterface.php : 18

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()

CronExpression_FieldInterface.php : 38

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