PHP 클래스 mult1mate\crontab\TaskManager

저자: mult1mate
파일 보기 프로젝트 열기: MUlt1mate/cron-manager 1 사용 예제들

공개 메소드들

메소드 설명
editTask ( mult1mate\crontab\TaskInterface $task, string $time, string $command, string $status = TaskInterface::TASK_STATUS_ACTIVE, string $comment = null ) : mult1mate\crontab\TaskInterface Edit and save TaskInterface object
getTaskCrontabLine ( mult1mate\crontab\TaskInterface $task, string $path, string $php_bin, string $input_file ) : string Formats task for export into crontab file
parseCommand ( string $command ) : array Parses command and returns an array which contains class, method and arguments of the command
parseCrontab ( string $cron, mult1mate\crontab\TaskInterface $task_class ) : array Parses each line of crontab content and creates new TaskInterface objects
validateCommand ( string $command ) : string | false Checks if the command is correct and removes spaces

비공개 메소드들

메소드 설명
createTaskWithCrontabLine ( mult1mate\crontab\TaskInterface $task_class, array $matches, string $comment ) : mult1mate\crontab\TaskInterface Creates new TaskInterface object from parsed crontab line

메소드 상세

editTask() 공개 정적인 메소드

Edit and save TaskInterface object
public static editTask ( mult1mate\crontab\TaskInterface $task, string $time, string $command, string $status = TaskInterface::TASK_STATUS_ACTIVE, string $comment = null ) : mult1mate\crontab\TaskInterface
$task mult1mate\crontab\TaskInterface
$time string
$command string
$status string
$comment string
리턴 mult1mate\crontab\TaskInterface

getTaskCrontabLine() 공개 정적인 메소드

Formats task for export into crontab file
public static getTaskCrontabLine ( mult1mate\crontab\TaskInterface $task, string $path, string $php_bin, string $input_file ) : string
$task mult1mate\crontab\TaskInterface
$path string
$php_bin string
$input_file string
리턴 string

parseCommand() 공개 정적인 메소드

Parses command and returns an array which contains class, method and arguments of the command
public static parseCommand ( string $command ) : array
$command string
리턴 array

parseCrontab() 공개 정적인 메소드

Parses each line of crontab content and creates new TaskInterface objects
public static parseCrontab ( string $cron, mult1mate\crontab\TaskInterface $task_class ) : array
$cron string
$task_class mult1mate\crontab\TaskInterface
리턴 array

validateCommand() 공개 정적인 메소드

Checks if the command is correct and removes spaces
public static validateCommand ( string $command ) : string | false
$command string
리턴 string | false