Elgg  Version 1.9
Public Member Functions | Protected Attributes | List of all members
Elgg_Queue_DatabaseQueue Class Reference
Inheritance diagram for Elgg_Queue_DatabaseQueue:
Elgg_Queue_Queue

Public Member Functions

 __construct ($name, Elgg_Database $db)
 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

 $name
 
 $db
 
 $workerId
 

Detailed Description

Definition at line 14 of file DatabaseQueue.php.

Constructor & Destructor Documentation

Elgg_Queue_DatabaseQueue::__construct (   $name,
Elgg_Database  $db 
)

Create a queue.

Parameters
string$nameName of the queue. Must be less than 256 characters.
Elgg_Database$dbDatabase adapter

Definition at line 31 of file DatabaseQueue.php.

Member Function Documentation

Elgg_Queue_DatabaseQueue::clear ( )

{Clear all items from the queue.

Returns
void
}

Implements Elgg_Queue_Queue.

Definition at line 78 of file DatabaseQueue.php.

Elgg_Queue_DatabaseQueue::dequeue ( )

{Remove an item from the queue.

Returns
mixed
}

Implements Elgg_Queue_Queue.

Definition at line 52 of file DatabaseQueue.php.

Elgg_Queue_DatabaseQueue::enqueue (   $item)

{Add an item to the queue.

Parameters
mixed$itemItem to add to queue
Returns
bool
}

Implements Elgg_Queue_Queue.

Definition at line 40 of file DatabaseQueue.php.

Elgg_Queue_DatabaseQueue::size ( )

{Get the size of the queue.

Returns
int
}

Implements Elgg_Queue_Queue.

Definition at line 86 of file DatabaseQueue.php.

Member Data Documentation

Elgg_Queue_DatabaseQueue::$db
protected

Definition at line 20 of file DatabaseQueue.php.

Elgg_Queue_DatabaseQueue::$name
protected

Definition at line 17 of file DatabaseQueue.php.

Elgg_Queue_DatabaseQueue::$workerId
protected

Definition at line 23 of file DatabaseQueue.php.


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