PHP Class Crontab\CrontabFileHandler

Author: Jacob Kiers ([email protected])
Afficher le fichier Open project: yzalis/crontab Class Usage Examples

Méthodes publiques

Свойство Type Description
$crontabExecutable string Location of the crontab executable

Protected Properties

Свойство Type Description
$error string The error when using the command 'crontab'
$output string The output when using the command 'crontab'

Méthodes publiques

Méthode Description
getCrontabExecutable ( ) : string Get crontab executable location
getError ( ) : string Get crontab error
getOutput ( ) : string Get crontab output
parseExistingCrontab ( Crontab $crontab ) : CrontabFileHandler Parse an existing crontab
parseFromFile ( Crontab $crontab, string $filename ) : CrontabFileHandler Reads cron jobs from a file.
setCrontabExecutable ( string $crontabExecutable ) : Crontab Set unix user to add crontab
write ( Crontab $crontab ) : CrontabFileHandler Write the current crons in the cron table
writeToFile ( Crontab $crontab, string $filename ) : CrontabFileHandler Write the current crons to a file.

Méthodes protégées

Méthode Description
crontabCommand ( Crontab $crontab ) : string Calcuates crontab command
parseString ( string $input ) : array Returns an array of Cron Jobs based on the contents of a file.

Method Details

crontabCommand() protected méthode

Calcuates crontab command
protected crontabCommand ( Crontab $crontab ) : string
$crontab Crontab
Résultat string

getCrontabExecutable() public méthode

Get crontab executable location
public getCrontabExecutable ( ) : string
Résultat string

getError() public méthode

Get crontab error
public getError ( ) : string
Résultat string

getOutput() public méthode

Get crontab output
public getOutput ( ) : string
Résultat string

parseExistingCrontab() public méthode

Parse an existing crontab
public parseExistingCrontab ( Crontab $crontab ) : CrontabFileHandler
$crontab Crontab
Résultat CrontabFileHandler

parseFromFile() public méthode

Reads cron jobs from a file.
public parseFromFile ( Crontab $crontab, string $filename ) : CrontabFileHandler
$crontab Crontab
$filename string
Résultat CrontabFileHandler

parseString() protected méthode

Returns an array of Cron Jobs based on the contents of a file.
protected parseString ( string $input ) : array
$input string
Résultat array of Variable and Job instances

setCrontabExecutable() public méthode

Set unix user to add crontab
public setCrontabExecutable ( string $crontabExecutable ) : Crontab
$crontabExecutable string
Résultat Crontab

write() public méthode

Write the current crons in the cron table
public write ( Crontab $crontab ) : CrontabFileHandler
$crontab Crontab
Résultat CrontabFileHandler

writeToFile() public méthode

Write the current crons to a file.
public writeToFile ( Crontab $crontab, string $filename ) : CrontabFileHandler
$crontab Crontab
$filename string
Résultat CrontabFileHandler

Property Details

$crontabExecutable public_oe property

Location of the crontab executable
public string $crontabExecutable
Résultat string

$error protected_oe property

The error when using the command 'crontab'
protected string $error
Résultat string

$output protected_oe property

The output when using the command 'crontab'
protected string $output
Résultat string