PHP Class TaskFile

Inheritance: extends Eloquent, use trait SoftDeletingTrait
Datei anzeigen Open project: MUlt1mate/cron-manager Class Usage Examples

Protected Properties

Property Type Description
$command
$comment
$data_file string Data file. Creates if not exists.
$status
$task_id
$time
$ts_created
$ts_updated

Public Methods

Method 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 method

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

createTaskRun() public method

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

find() public static method

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

getAll() public static method

Returns array of all tasks
public static getAll ( ) : array
return array

getCommand() public method

public getCommand ( ) : mixed
return mixed

getComment() public method

public getComment ( ) : mixed
return mixed

getStatus() public method

public getStatus ( ) : mixed
return mixed

getTaskId() public method

public getTaskId ( ) : mixed
return mixed

getTime() public method

public getTime ( ) : mixed
return mixed

getTs() public method

public getTs ( ) : mixed
return mixed

getTsUpdated() public method

public getTsUpdated ( ) : mixed
return mixed

setCommand() public method

public setCommand ( mixed $command )
$command mixed

setComment() public method

public setComment ( mixed $comment )
$comment mixed

setStatus() public method

public setStatus ( mixed $status )
$status mixed

setTaskId() public method

public setTaskId ( integer $task_id )
$task_id integer

setTime() public method

public setTime ( mixed $time )
$time mixed

setTs() public method

public setTs ( mixed $ts )
$ts mixed

setTsUpdated() public method

public setTsUpdated ( mixed $ts )
$ts mixed

taskDelete() public method

Deletes the task
public taskDelete ( ) : mixed
return mixed

taskFileLoad() public static method

Reads file from disk and returns array of tasks
public static taskFileLoad ( ) : array
return array

taskFileSave() public static method

Writes tasks into file
public static taskFileSave ( array $tasks ) : boolean
$tasks array
return boolean

taskGet() public static method

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

taskSave() public method

Saves the task
public taskSave ( ) : mixed
return 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
return 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