interface JobSchedulerCronTabInterface in Job Scheduler 8.3
Same name and namespace in other branches
- 8.2 src/JobSchedulerCronTabInterface.php \Drupal\job_scheduler\JobSchedulerCronTabInterface
Provides an interface for JobSchedulerCronTab.
Hierarchy
- interface \Drupal\job_scheduler\JobSchedulerCronTabInterface
Expanded class hierarchy of JobSchedulerCronTabInterface
All classes that implement JobSchedulerCronTabInterface
File
- src/
JobSchedulerCronTabInterface.php, line 8
Namespace
Drupal\job_schedulerView source
interface JobSchedulerCronTabInterface {
/**
* Parses a full crontab string into an array of type => values.
*
* Note this one is static and can be used to validate values.
*
* @param string $crontab
* The crontab string to parse.
*
* @return array
* The parsed crontab array.
*/
public static function parse($crontab);
/**
* Parses an array of values, check whether this is valid.
*
* @param array $array
* A crontab array to validate.
*
* @return null|array
* The validated elements or null if the input was invalid.
*/
public static function values(array $array);
/**
* Finds the next occurrence within the next year as unix timestamp.
*
* @param int $start_time
* (optional) Starting time. Defaults to null.
* @param int $limit
* (optional) The time limit in days. Defaults to 366.
*
* @return int|false
* The next occurrence as a unix timestamp, or false if there was an error.
*/
public function nextTime($start_time = NULL, $limit = 366);
/**
* Finds the next occurrence within the next year as a date array.
*
* @param array $date
* Date array with: 'mday', 'mon', 'year', 'hours', 'minutes'.
* @param int $limit
* (optional) The time limit in days. Defaults to 366.
*
* @return array|false
* A date array, or false if there was an error.
*
* @see getdate()
*/
public function nextDate(array $date, $limit = 366);
/**
* Get values for each type.
*
* @param string $type
* The element type. One of 'minutes', 'hours', 'mday', 'mon', 'wday'.
*
* @return array
* An array on integers specifying the range of the provided type.
*/
public static function possibleValues($type);
/**
* Replaces element names with values.
*
* @param string $type
* The element type. One of 'wday' or 'mon'.
* @param string $string
* The element string to translate.
*
* @return string
* The translated string.
*/
public static function translateNames($type, $string);
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JobSchedulerCronTabInterface:: |
public | function | Finds the next occurrence within the next year as a date array. | 1 |
JobSchedulerCronTabInterface:: |
public | function | Finds the next occurrence within the next year as unix timestamp. | 1 |
JobSchedulerCronTabInterface:: |
public static | function | Parses a full crontab string into an array of type => values. | 1 |
JobSchedulerCronTabInterface:: |
public static | function | Get values for each type. | 1 |
JobSchedulerCronTabInterface:: |
public static | function | Replaces element names with values. | 1 |
JobSchedulerCronTabInterface:: |
public static | function | Parses an array of values, check whether this is valid. | 1 |