[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 568 lines (20 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
CronExpression:: (19 methods):
registerAlias()
unregisterAlias()
supportsAlias()
getAliases()
factory()
isValidExpression()
__construct()
setExpression()
setPart()
setMaxIterationCount()
getNextRunDate()
getPreviousRunDate()
getMultipleRunDates()
getExpression()
getParts()
__toString()
isDue()
getRunDate()
determineTimeZone()
Class: CronExpression - X-Ref
CRON expression parser that can determine whether or not a CRON expression isregisterAlias(string $alias, string $expression) X-Ref |
Registered a user defined CRON Expression Alias. |
unregisterAlias(string $alias) X-Ref |
Unregistered a user defined CRON Expression Alias. |
supportsAlias(string $alias) X-Ref |
Tells whether a CRON Expression alias is registered. |
getAliases() X-Ref |
Returns all registered aliases as an associated array where the aliases are the key and their associated expressions are the values. return: array<string, string> |
factory(string $expression, FieldFactoryInterface $fieldFactory = null) X-Ref |
isValidExpression(string $expression) X-Ref |
Validate a CronExpression. param: string $expression the CRON expression to validate return: bool True if a valid CRON expression was passed. False if not. |
__construct(string $expression, FieldFactoryInterface $fieldFactory = null) X-Ref |
Parse a CRON expression. param: string $expression CRON expression (e.g. '8 * * * *') param: null|FieldFactoryInterface $fieldFactory Factory to create cron fields |
setExpression(string $value) X-Ref |
Set or change the CRON expression. param: string $value CRON expression (e.g. 8 * * * *) return: CronExpression |
setPart(int $position, string $value) X-Ref |
Set part of the CRON expression. param: int $position The position of the CRON expression to set param: string $value The value to set return: CronExpression |
setMaxIterationCount(int $maxIterationCount) X-Ref |
Set max iteration count for searching next run dates. param: int $maxIterationCount Max iteration count when searching for next run date return: CronExpression |
getNextRunDate($currentTime = 'now', int $nth = 0, bool $allowCurrentDate = false, $timeZone = null) X-Ref |
Get a next run date relative to the current date or a specific date param: string|\DateTimeInterface $currentTime Relative calculation date param: int $nth Number of matches to skip before returning a param: bool $allowCurrentDate Set to TRUE to return the current date if param: null|string $timeZone TimeZone to use instead of the system default return: \DateTime |
getPreviousRunDate($currentTime = 'now', int $nth = 0, bool $allowCurrentDate = false, $timeZone = null) X-Ref |
Get a previous run date relative to the current date or a specific date. param: string|\DateTimeInterface $currentTime Relative calculation date param: int $nth Number of matches to skip before returning param: bool $allowCurrentDate Set to TRUE to return the param: null|string $timeZone TimeZone to use instead of the system default return: \DateTime |
getMultipleRunDates(int $total, $currentTime = 'now', bool $invert = false, bool $allowCurrentDate = false, $timeZone = null) X-Ref |
Get multiple run dates starting at the current date or a specific date. param: int $total Set the total number of dates to calculate param: string|\DateTimeInterface|null $currentTime Relative calculation date param: bool $invert Set to TRUE to retrieve previous dates param: bool $allowCurrentDate Set to TRUE to return the param: null|string $timeZone TimeZone to use instead of the system default return: \DateTime[] Returns an array of run dates |
getExpression($part = null) X-Ref |
Get all or part of the CRON expression. param: int|string|null $part specify the part to retrieve or NULL to get the full return: null|string Returns the CRON expression, a part of the |
getParts() X-Ref |
Gets the parts of the cron expression as an array. return: string[] |
__toString() X-Ref |
Helper method to output the full expression. return: string Full CRON expression |
isDue($currentTime = 'now', $timeZone = null) X-Ref |
Determine if the cron is due to run based on the current date or a specific date. This method assumes that the current number of seconds are irrelevant, and should be called once per minute. param: string|\DateTimeInterface $currentTime Relative calculation date param: null|string $timeZone TimeZone to use instead of the system default return: bool Returns TRUE if the cron is due to run or FALSE if not |
getRunDate($currentTime = null, int $nth = 0, bool $invert = false, bool $allowCurrentDate = false, $timeZone = null) X-Ref |
Get the next or previous run date of the expression relative to a date. param: string|\DateTimeInterface|null $currentTime Relative calculation date param: int $nth Number of matches to skip before returning param: bool $invert Set to TRUE to go backwards in time param: bool $allowCurrentDate Set to TRUE to return the param: string|null $timeZone TimeZone to use instead of the system default return: \DateTime |
determineTimeZone($currentTime, ?string $timeZone) X-Ref |
Workout what timeZone should be used. param: string|\DateTimeInterface|null $currentTime Relative calculation date param: string|null $timeZone TimeZone to use instead of the system default return: string |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |