XG Proyect

Queue
in package

Queue Class

Tags
category

Classes

author

XG Proyect Team

license

http://www.xgproyect.org XG Proyect

link
http://www.xgproyect.org
version
3.1.0

Table of Contents

ITEM_SEPARATOR  = ','
QUEUE_SEPARATOR  = ';'
$queue  : array<string|int, mixed>
__construct()  : void
Init with current queue
addElementToQueue()  : void
Adds an element to the queue
countQueueElements()  : int
Count the amount of elements of the current queue
getElementFromQueueAsArray()  : array<string|int, mixed>
Returns an element from the queue
removeElementFromQueue()  : void
Removes an element from the queue
returnQueueAsArray()  : array<string|int, mixed>
Returns the queue as an associative array
returnQueueAsString()  : string
Returns the queue as a string
breakDownCurrentQueue()  : void
Process the queue and put it into an array format
makeUpCurrentQueue()  : void
Process the queue and put into a string

Constants

ITEM_SEPARATOR

public mixed ITEM_SEPARATOR = ','

QUEUE_SEPARATOR

public mixed QUEUE_SEPARATOR = ';'

Properties

$queue

private array<string|int, mixed> $queue = []

Methods

__construct()

Init with current queue

public __construct([string $current_queue = [] ]) : void
Parameters
$current_queue : string = []

The current queue

Return values
void

addElementToQueue()

Adds an element to the queue

public addElementToQueue(QueueElements $queue_elements) : void
Parameters
$queue_elements : QueueElements

Elements to queue

Return values
void

countQueueElements()

Count the amount of elements of the current queue

public countQueueElements() : int
Return values
int

getElementFromQueueAsArray()

Returns an element from the queue

public getElementFromQueueAsArray(int $element_id) : array<string|int, mixed>
Parameters
$element_id : int

Element ID

Return values
array<string|int, mixed>

removeElementFromQueue()

Removes an element from the queue

public removeElementFromQueue(int $element_id) : void
Parameters
$element_id : int

Element ID

Return values
void

returnQueueAsArray()

Returns the queue as an associative array

public returnQueueAsArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

returnQueueAsString()

Returns the queue as a string

public returnQueueAsString() : string
Return values
string

breakDownCurrentQueue()

Process the queue and put it into an array format

private breakDownCurrentQueue() : void
Return values
void

makeUpCurrentQueue()

Process the queue and put into a string

private makeUpCurrentQueue() : void
Return values
void

Search results