PHP 클래스 Crontab\Crontab

저자: Benjamin Laugueux ([email protected])
파일 보기 프로젝트 열기: yzalis/crontab 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$crontabFileHandler CrontabFileHandler
$user string The user executing the comment 'crontab'

공개 메소드들

메소드 설명
__construct ( boolean | true $parseExistingCrontab = true ) Constructor
addItem ( Crontab\Job | Variable $item ) : Crontab
addJob ( Crontab\Job $job ) : Crontab Add a new job to the crontab
addVariable ( Variable $variable ) : Crontab
flush ( ) : Crontab Remove all crontab content
getCrontabExecutable ( ) : string Get crontab executable location
getCrontabFileHandler ( ) : CrontabFileHandler Returns a Crontab File Handler
getError ( ) : string Get crontab error
getJobs ( ) : Crontab\Job[] Get all crontab jobs
getOutput ( ) : string Get crontab output
getUser ( ) : string Get unix user to add crontab
getVariables ( ) : Variable[] Get all variables in crontab
parseExistingCrontab ( ) : Crontab Parse an existing crontab
removeAllJobs ( ) : Crontab Remove all job in the current crontab
removeAllVariables ( ) : Crontab
removeJob ( Crontab\Job $job ) : Crontab Remove a specified job in the current crontab
removeVariable ( Variable $variable ) : Crontab
render ( ) : string Render the crontab and associated jobs
setCrontabExecutable ( string $crontabExecutable ) : Crontab Set unix user to add crontab
setCrontabFileHandler ( CrontabFileHandler $command ) Set the Crontab File Handler
setJobs ( array $jobs ) : Crontab Adda new job to the crontab
setUser ( string $user ) : Crontab Set unix user to add crontab
setVariables ( array $variables ) : Crontab
write ( ) Write the current crons in the cron table

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( boolean | true $parseExistingCrontab = true )
$parseExistingCrontab boolean | true

addItem() 공개 메소드

public addItem ( Crontab\Job | Variable $item ) : Crontab
$item Crontab\Job | Variable
리턴 Crontab

addJob() 공개 메소드

Add a new job to the crontab
public addJob ( Crontab\Job $job ) : Crontab
$job Crontab\Job
리턴 Crontab

addVariable() 공개 메소드

public addVariable ( Variable $variable ) : Crontab
$variable Variable
리턴 Crontab

flush() 공개 메소드

Remove all crontab content
public flush ( ) : Crontab
리턴 Crontab

getCrontabExecutable() 공개 메소드

Get crontab executable location
사용 중단: Please use {@see \CrontabFileHandler::getCrontabExecutable()}
public getCrontabExecutable ( ) : string
리턴 string

getCrontabFileHandler() 공개 메소드

Returns a Crontab File Handler
public getCrontabFileHandler ( ) : CrontabFileHandler
리턴 CrontabFileHandler

getError() 공개 메소드

Get crontab error
사용 중단: Please use {@see \CrontabFileHandler::getError()}
public getError ( ) : string
리턴 string

getJobs() 공개 메소드

Get all crontab jobs
public getJobs ( ) : Crontab\Job[]
리턴 Crontab\Job[] An array of Job

getOutput() 공개 메소드

Get crontab output
사용 중단: Please use {@see \CrontabFileHandler::getOutput()}
public getOutput ( ) : string
리턴 string

getUser() 공개 메소드

Get unix user to add crontab
public getUser ( ) : string
리턴 string

getVariables() 공개 메소드

Get all variables in crontab
public getVariables ( ) : Variable[]
리턴 Variable[] an array of Variable

parseExistingCrontab() 공개 메소드

Parse an existing crontab
사용 중단: Please use {@see \CrontabFileHandler::parseExistingCrontab()}
public parseExistingCrontab ( ) : Crontab
리턴 Crontab

removeAllJobs() 공개 메소드

Remove all job in the current crontab
public removeAllJobs ( ) : Crontab
리턴 Crontab

removeAllVariables() 공개 메소드

public removeAllVariables ( ) : Crontab
리턴 Crontab

removeJob() 공개 메소드

Remove a specified job in the current crontab
public removeJob ( Crontab\Job $job ) : Crontab
$job Crontab\Job
리턴 Crontab

removeVariable() 공개 메소드

public removeVariable ( Variable $variable ) : Crontab
$variable Variable
리턴 Crontab

render() 공개 메소드

Render the crontab and associated jobs
public render ( ) : string
리턴 string

setCrontabExecutable() 공개 메소드

Set unix user to add crontab
사용 중단: Please use {@see \CrontabFileHandler::setCrontabExecutable()}
public setCrontabExecutable ( string $crontabExecutable ) : Crontab
$crontabExecutable string
리턴 Crontab

setCrontabFileHandler() 공개 메소드

Set the Crontab File Handler
public setCrontabFileHandler ( CrontabFileHandler $command )
$command CrontabFileHandler

setJobs() 공개 메소드

Adda new job to the crontab
public setJobs ( array $jobs ) : Crontab
$jobs array
리턴 Crontab

setUser() 공개 메소드

Set unix user to add crontab
public setUser ( string $user ) : Crontab
$user string
리턴 Crontab

setVariables() 공개 메소드

public setVariables ( array $variables ) : Crontab
$variables array
리턴 Crontab

write() 공개 메소드

Write the current crons in the cron table
사용 중단: Please use {@see \CrontabFileHandler::write()}
public write ( )

프로퍼티 상세

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

protected CrontabFileHandler,crontab $crontabFileHandler
리턴 CrontabFileHandler

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

The user executing the comment 'crontab'
protected string $user
리턴 string