Queue
Class Queue
Table of Contents
Methods
- __construct() : mixed
- Queue constructor.
- current() : null|string
- Get last used item from list.
- delete() : $this
- Remove data from DB by type and ID.
- disableAutoSave() : $this
- Save last item automatically.
- enableUserCheck() : $this
- Return true if user checking enabled.
- enableWorkTimeCheck() : $this
- Enable work time checking.
- getId() : null|string
- Get ID.
- getValues() : array<string|int, mixed>
- Get list.
- isSupportedWorkTime() : bool
- Return true if wirk time is supported.
- isWorkTimeCheckEnabled() : bool
- Return true if work time checking enabled.
- next() : string|null
- Return next item from list.
- previous() : string|null
- Return previous used item.
- restore() : $this
- Restore last item from DB.
- save() : $this
- Save last item to DB.
- setId() : $this
- Set ID.
- setValues() : $this
- Set list.
Methods
__construct()
Queue constructor.
public
__construct(string $type, string $id[, array<string|int, mixed> $list = [] ]) : mixed
Parameters
- $type : string
-
Type.
- $id : string
-
ID.
- $list : array<string|int, mixed> = []
-
List.
current()
Get last used item from list.
public
current() : null|string
Return values
null|stringdelete()
Remove data from DB by type and ID.
public
delete() : $this
Return values
$thisdisableAutoSave()
Save last item automatically.
public
disableAutoSave() : $this
Return values
$thisenableUserCheck()
Return true if user checking enabled.
public
enableUserCheck() : $this
Return values
$thisenableWorkTimeCheck()
Enable work time checking.
public
enableWorkTimeCheck() : $this
Return values
$thisgetId()
Get ID.
public
getId() : null|string
Return values
null|stringgetValues()
Get list.
public
getValues() : array<string|int, mixed>
Return values
array<string|int, mixed>isSupportedWorkTime()
Return true if wirk time is supported.
public
static isSupportedWorkTime() : bool
Return values
boolisWorkTimeCheckEnabled()
Return true if work time checking enabled.
public
isWorkTimeCheckEnabled() : bool
Return values
boolnext()
Return next item from list.
public
next() : string|null
Save item to DB if $isAutoSaveEnabled is true. Check item as User if $isUserCheckEnabled is true. Check item for work time if $isWorkTimeCheckEnabled is true.
Return values
string|nullprevious()
Return previous used item.
public
previous() : string|null
Stack of previous items is limited by 3 values.
Return values
string|nullrestore()
Restore last item from DB.
public
restore() : $this
Return values
$thissave()
Save last item to DB.
public
save() : $this
Return values
$thissetId()
Set ID.
public
setId(null|string $id) : $this
Parameters
- $id : null|string
Return values
$thissetValues()
Set list.
public
setValues(array<string|int, mixed> $list) : $this
Parameters
- $list : array<string|int, mixed>
-
List.