TaskLogService
Table of Contents
Methods
- __construct() : mixed
- add() : TaskLog
- Add entry to task history
- castValueTypeByKeyInTrackedFields() : void
- Casting the type of the received value by its field in $this->getTrackedFields() to the desired one
- delete() : bool
- Delete task log
- deleteByTaskId() : bool
- Delete all entries from task history
- getChanges() : array<string|int, Change>
- Get changes between current task fields and new ones
- getTrackedFields() : array<string|int, mixed>
- Getting the union of self::$comparedFields and user fields
Methods
__construct()
public
__construct() : mixed
add()
Add entry to task history
public
add(AddCommand $command) : TaskLog
Parameters
- $command : AddCommand
Tags
Return values
TaskLogcastValueTypeByKeyInTrackedFields()
Casting the type of the received value by its field in $this->getTrackedFields() to the desired one
public
castValueTypeByKeyInTrackedFields(mixed &$value, int|string $key) : void
Parameters
- $value : mixed
- $key : int|string
delete()
Delete task log
public
delete(DeleteCommand $command) : bool
Parameters
- $command : DeleteCommand
Tags
Return values
booldeleteByTaskId()
Delete all entries from task history
public
deleteByTaskId(DeleteByTaskIdCommand $command) : bool
Parameters
- $command : DeleteByTaskIdCommand
Tags
Return values
boolgetChanges()
Get changes between current task fields and new ones
public
getChanges(array<string|int, mixed> $currentFields, array<string|int, mixed> $newFields) : array<string|int, Change>
Parameters
- $currentFields : array<string|int, mixed>
- $newFields : array<string|int, mixed>
Tags
Return values
array<string|int, Change>getTrackedFields()
Getting the union of self::$comparedFields and user fields
public
getTrackedFields() : array<string|int, mixed>