Elgg  Version master
Public Member Functions | Protected Attributes | List of all members
Elgg\Queue\MemoryQueue Class Reference

FIFO queue that is memory based (not persistent) More...

Inheritance diagram for Elgg\Queue\MemoryQueue:
Elgg\Queue\Queue

Public Member Functions

 __construct ()
 Create a queue. More...
 
 enqueue ($item)
 {Add an item to the queue.
Parameters
mixed$itemItem to add to queue
Returns
bool
} More...
 
 dequeue ()
 {Remove an item from the queue.
Returns
mixed
} More...
 
 clear ()
 {Clear all items from the queue.
Returns
void
} More...
 
 size ()
 {Get the size of the queue.
Returns
int
} More...
 

Protected Attributes

 $queue = []
 

Detailed Description

FIFO queue that is memory based (not persistent)

Definition at line 11 of file MemoryQueue.php.

Constructor & Destructor Documentation

Elgg\Queue\MemoryQueue::__construct ( )

Create a queue.

Definition at line 19 of file MemoryQueue.php.

Member Function Documentation

Elgg\Queue\MemoryQueue::clear ( )

{Clear all items from the queue.

Returns
void
}

Implements Elgg\Queue\Queue.

Definition at line 40 of file MemoryQueue.php.

Elgg\Queue\MemoryQueue::dequeue ( )

{Remove an item from the queue.

Returns
mixed
}

Implements Elgg\Queue\Queue.

Definition at line 33 of file MemoryQueue.php.

Elgg\Queue\MemoryQueue::enqueue (   $item)

{Add an item to the queue.

Parameters
mixed$itemItem to add to queue
Returns
bool
}

Implements Elgg\Queue\Queue.

Definition at line 26 of file MemoryQueue.php.

Elgg\Queue\MemoryQueue::size ( )

{Get the size of the queue.

Returns
int
}

Implements Elgg\Queue\Queue.

Definition at line 47 of file MemoryQueue.php.

Member Data Documentation

Elgg\Queue\MemoryQueue::$queue = []
protected

Definition at line 14 of file MemoryQueue.php.


The documentation for this class was generated from the following file: