| Elgg
    Version 6.3
    | 
FIFO queue that uses the database for persistence. More...
 
  
| Public Member Functions | ||||
| __construct (protected string $name, protected \Elgg\Database $db) | ||||
| Create a queue.  More... | ||||
| enqueue ($item) | ||||
| {Add an item to the queue. 
 
 | ||||
| dequeue () | ||||
| {Remove an item from the queue. 
 | ||||
| clear () | ||||
| {Clear all items from the queue. 
 | ||||
| size () | ||||
| {Get the size of the queue. 
 | ||||
| Public Attributes | |
| const | TABLE_NAME = 'queue' | 
| Protected Attributes | |
| $workerId | |
FIFO queue that uses the database for persistence.
Definition at line 17 of file DatabaseQueue.php.
| Elgg\Queue\DatabaseQueue::__construct | ( | protected string | $name, | 
| protected \Elgg\Database | $db | ||
| ) | 
Create a queue.
| string | $name | Name of the queue. Must be less than 256 characters. | 
| \Elgg\Database | $db | Database adapter | 
Definition at line 37 of file DatabaseQueue.php.
| Elgg\Queue\DatabaseQueue::clear | ( | ) | 
{Clear all items from the queue.
Implements Elgg\Queue\Queue.
Definition at line 95 of file DatabaseQueue.php.
| Elgg\Queue\DatabaseQueue::dequeue | ( | ) | 
{Remove an item from the queue.
Implements Elgg\Queue\Queue.
Reimplemented in Elgg\Notifications\NotificationsQueue.
Definition at line 58 of file DatabaseQueue.php.
| Elgg\Queue\DatabaseQueue::enqueue | ( | $item | ) | 
{Add an item to the queue.
| mixed | $item | Item to add to queue | 
Implements Elgg\Queue\Queue.
Definition at line 44 of file DatabaseQueue.php.
| Elgg\Queue\DatabaseQueue::size | ( | ) | 
{Get the size of the queue.
Implements Elgg\Queue\Queue.
Definition at line 105 of file DatabaseQueue.php.
| 
 | protected | 
Definition at line 29 of file DatabaseQueue.php.
| const Elgg\Queue\DatabaseQueue::TABLE_NAME = 'queue' | 
Definition at line 24 of file DatabaseQueue.php.