PHP 클래스 CronLingo\Parser

Class Parser
파일 보기 프로젝트 열기: ajbdev/cronlingo 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cron Cron
$dayOfWeekMap array
$fieldMap array
$intervalMap array
$monthMap array
$position integer
$timeOfDayMap array
$tokenMap array Regular expressions used to tokenize a string
$tokens array Array of lexed tokens
$weekdayWeekendMap array

공개 메소드들

메소드 설명
expects ( $token, $types ) Enforce expectations of a certain token
parse ( $value ) : string Parse a string into a CRON expression
reset ( ) Reset parser token position and CRON expression

보호된 메소드들

메소드 설명
compileRegex ( ) : string Concatenate regex expressions into a single regex for performance
current ( ) : array Retrieve current token based on position
evaluate ( ) Evaluate tokens and build CRON expression
is ( $token, $types ) : boolean Check if a token is of a type
lex ( $string ) : array Lex a string into tokens
next ( integer $skip = 1 ) : boolean Look ahead in the token array
nilTime ( $field ) For simple expressions, zero out the time so the cron matches user expectation and does not execute constantly.
previous ( integer $skip = 1 ) : boolean Look behind in the token array
seek ( $index ) : boolean Seek a specific token

메소드 상세

compileRegex() 보호된 메소드

Concatenate regex expressions into a single regex for performance
protected compileRegex ( ) : string
리턴 string

current() 보호된 메소드

Retrieve current token based on position
protected current ( ) : array
리턴 array

evaluate() 보호된 메소드

Evaluate tokens and build CRON expression
protected evaluate ( )

expects() 공개 메소드

Enforce expectations of a certain token
public expects ( $token, $types )
$token
$types

is() 보호된 메소드

Check if a token is of a type
protected is ( $token, $types ) : boolean
$token
$types
리턴 boolean

lex() 보호된 메소드

Lex a string into tokens
protected lex ( $string ) : array
$string
리턴 array

next() 보호된 메소드

Look ahead in the token array
protected next ( integer $skip = 1 ) : boolean
$skip integer
리턴 boolean

nilTime() 보호된 메소드

E.g., someone would not expect "Every day on Tuesday" to run for every minute and hour on Tuesday.
protected nilTime ( $field )
$field

parse() 공개 메소드

Parse a string into a CRON expression
public parse ( $value ) : string
$value
리턴 string

previous() 보호된 메소드

Look behind in the token array
protected previous ( integer $skip = 1 ) : boolean
$skip integer
리턴 boolean

reset() 공개 메소드

Reset parser token position and CRON expression
public reset ( )

seek() 보호된 메소드

Seek a specific token
protected seek ( $index ) : boolean
$index
리턴 boolean

프로퍼티 상세

$cron 보호되어 있는 프로퍼티

protected Cron,cronlingo $cron
리턴 Cron

$dayOfWeekMap 보호되어 있는 프로퍼티

protected array $dayOfWeekMap
리턴 array

$fieldMap 보호되어 있는 프로퍼티

protected array $fieldMap
리턴 array

$intervalMap 보호되어 있는 프로퍼티

protected array $intervalMap
리턴 array

$monthMap 보호되어 있는 프로퍼티

protected array $monthMap
리턴 array

$position 보호되어 있는 프로퍼티

protected int $position
리턴 integer

$timeOfDayMap 보호되어 있는 프로퍼티

protected array $timeOfDayMap
리턴 array

$tokenMap 보호되어 있는 프로퍼티

Regular expressions used to tokenize a string
protected array $tokenMap
리턴 array

$tokens 보호되어 있는 프로퍼티

Array of lexed tokens
protected array $tokens
리턴 array

$weekdayWeekendMap 보호되어 있는 프로퍼티

protected array $weekdayWeekendMap
리턴 array