TaskRepository
TaskRepository

Handles persistence of the task queue to and from disk.

Functions
create
public function create(
Task $task
)

Create a new entry in the task queue.

Parameters
task
Task$

A Task object representing the task to add.

Throws
TaskAlreadyExists

when the given task is already in the queue

TaskUpdateFailed

when the task queue cannot be written

delete
public function delete(
Task $task
)

Delete a task from the queue.

Parameters
task
Task$

The task to delete

Throws
TaskUpdateFailed

when the updated queue cannot be written

getAll
public function getAll()

Reads and returns the entire task queue.

Returns

A list of Task instances.

setTaskQueuePath
public function setTaskQueuePath(
$path
)

Set the path to the task queue file.  Intended for unit testing.