Overview

Namespaces

  • Cron
  • None

Classes

  • AbstractField
  • CronExpression
  • DayOfMonthField
  • DayOfWeekField
  • FieldFactory
  • HoursField
  • MinutesField
  • MonthField
  • YearField

Interfaces

  • FieldInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class DayOfWeekField

Day of week field. Allows: * / , - ? L #

Days of the week can be represented as a number 0-7 (0|7 = Sunday) or as a three letter string: SUN, MON, TUE, WED, THU, FRI, SAT.

'L' stands for "last". It allows you to specify constructs such as "the last Friday" of a given month.

'#' is allowed for the day-of-week field, and must be followed by a number between one and five. It allows you to specify constructs such as "the second Friday" of a given month.

Cron\AbstractField implements Cron\FieldInterface
Extended by Cron\DayOfWeekField
Namespace: Cron
Located at Scheduling/Vendor/CronExpression/src/Cron/DayOfWeekField.php
Methods summary
public boolean
# isSatisfiedBy( DateTime $date, string $value )

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

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

Parameters

$date
DateTime
$date DateTime object to check
$value
string
$value CRON expression to test against

Returns

boolean
Returns TRUE if satisfied, FALSE otherwise
public Cron\FieldInterface
# increment( DateTime $date, boolean $invert = false )

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

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

$date
DateTime
$date DateTime object to change
$invert
boolean
$invert (optional) Set to TRUE to decrement

Returns

Cron\FieldInterface
public boolean
# validate( string $value )

Validates a CRON expression for a given field

Validates a CRON expression for a given field

Parameters

$value
string
$value CRON expression value to validate

Returns

boolean
Returns TRUE if valid, FALSE otherwise
Methods inherited from Cron\AbstractField
isInIncrementsOfRanges(), isInRange(), isIncrementsOfRanges(), isRange(), isSatisfied()
API documentation generated by ApiGen 2.8.0