Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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 15 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 32 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 84 of file DatabaseQueue.php.

Elgg\Queue\DatabaseQueue::dequeue ( )

{Remove an item from the queue.

Returns
mixed
}

Implements Elgg\Queue\Queue.

Definition at line 55 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 41 of file DatabaseQueue.php.

Elgg\Queue\DatabaseQueue::size ( )

{Get the size of the queue.

Returns
int
}

Implements Elgg\Queue\Queue.

Definition at line 94 of file DatabaseQueue.php.

Member Data Documentation

Elgg\Queue\DatabaseQueue::$db
protected

Definition at line 21 of file DatabaseQueue.php.

Elgg\Queue\DatabaseQueue::$name
protected

Definition at line 18 of file DatabaseQueue.php.

Elgg\Queue\DatabaseQueue::$workerId
protected

Definition at line 24 of file DatabaseQueue.php.


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