PHP Class TaskFile

Inheritance: extends Eloquent, use trait SoftDeletingTrait
Afficher le fichier Open project: MUlt1mate/cron-manager Class Usage Examples

Protected Properties

Свойство Type Description
$command
$comment
$data_file string Data file. Creates if not exists.
$status
$task_id
$time
$ts_created
$ts_updated

Méthodes publiques

Méthode Description
createNew ( ) : mult1mate\crontab\TaskInterface Creates new task object and returns it
createTaskRun ( ) : mult1mate\crontab\TaskRunInterface Creates new task run object for current task and returns it
find ( array $task_ids ) : array Returns array of tasks with specified ids
getAll ( ) : array Returns array of all tasks
getCommand ( ) : mixed
getComment ( ) : mixed
getStatus ( ) : mixed
getTaskId ( ) : mixed
getTime ( ) : mixed
getTs ( ) : mixed
getTsUpdated ( ) : mixed
setCommand ( mixed $command )
setComment ( mixed $comment )
setStatus ( mixed $status )
setTaskId ( integer $task_id )
setTime ( mixed $time )
setTs ( mixed $ts )
setTsUpdated ( mixed $ts )
taskDelete ( ) : mixed Deletes the task
taskFileLoad ( ) : array Reads file from disk and returns array of tasks
taskFileSave ( array $tasks ) : boolean Writes tasks into file
taskGet ( integer $task_id ) : mult1mate\crontab\TaskInterface Returns tasks with given id
taskSave ( ) : mixed Saves the task

Method Details

createNew() public static méthode

Creates new task object and returns it
public static createNew ( ) : mult1mate\crontab\TaskInterface
Résultat mult1mate\crontab\TaskInterface

createTaskRun() public méthode

Creates new task run object for current task and returns it
public createTaskRun ( ) : mult1mate\crontab\TaskRunInterface
Résultat mult1mate\crontab\TaskRunInterface

find() public static méthode

Returns array of tasks with specified ids
public static find ( array $task_ids ) : array
$task_ids array array of task ids
Résultat array

getAll() public static méthode

Returns array of all tasks
public static getAll ( ) : array
Résultat array

getCommand() public méthode

public getCommand ( ) : mixed
Résultat mixed

getComment() public méthode

public getComment ( ) : mixed
Résultat mixed

getStatus() public méthode

public getStatus ( ) : mixed
Résultat mixed

getTaskId() public méthode

public getTaskId ( ) : mixed
Résultat mixed

getTime() public méthode

public getTime ( ) : mixed
Résultat mixed

getTs() public méthode

public getTs ( ) : mixed
Résultat mixed

getTsUpdated() public méthode

public getTsUpdated ( ) : mixed
Résultat mixed

setCommand() public méthode

public setCommand ( mixed $command )
$command mixed

setComment() public méthode

public setComment ( mixed $comment )
$comment mixed

setStatus() public méthode

public setStatus ( mixed $status )
$status mixed

setTaskId() public méthode

public setTaskId ( integer $task_id )
$task_id integer

setTime() public méthode

public setTime ( mixed $time )
$time mixed

setTs() public méthode

public setTs ( mixed $ts )
$ts mixed

setTsUpdated() public méthode

public setTsUpdated ( mixed $ts )
$ts mixed

taskDelete() public méthode

Deletes the task
public taskDelete ( ) : mixed
Résultat mixed

taskFileLoad() public static méthode

Reads file from disk and returns array of tasks
public static taskFileLoad ( ) : array
Résultat array

taskFileSave() public static méthode

Writes tasks into file
public static taskFileSave ( array $tasks ) : boolean
$tasks array
Résultat boolean

taskGet() public static méthode

Returns tasks with given id
public static taskGet ( integer $task_id ) : mult1mate\crontab\TaskInterface
$task_id integer
Résultat mult1mate\crontab\TaskInterface

taskSave() public méthode

Saves the task
public taskSave ( ) : mixed
Résultat mixed

Property Details

$command protected_oe property

protected $command

$comment protected_oe property

protected $comment

$data_file protected_oe static_oe property

Data file. Creates if not exists.
protected static string $data_file
Résultat string

$status protected_oe property

protected $status

$task_id protected_oe property

protected $task_id

$time protected_oe property

protected $time

$ts_created protected_oe property

protected $ts_created

$ts_updated protected_oe property

protected $ts_updated