Bitrix API

ValuesQueue

Table of Contents

Methods

addElement()  : void
Puts an element into the queue.
deleteAll()  : void
Clears all the queues.
deleteElement()  : void
Removes an element from the queue.
get()  : mixed
Returns the queue elements for the given iblock which were not queried from the database.
getElement()  : false|null|array<string|int, mixed>
Returns data of the element from the queue.
getInstance()  : ValuesQueue
Returns a queue instance by the key provided.
set()  : void
Stores the values for queue elements for future reference.
setElement()  : void
Stores the data for the element in the queue.

Methods

addElement()

Puts an element into the queue.

public addElement(int $iblockId, int $id) : void
Parameters
$iblockId : int

Iblock identifier.

$id : int

Element identifier.

deleteAll()

Clears all the queues.

public static deleteAll() : void

deleteElement()

Removes an element from the queue.

public deleteElement(int $iblockId, int $id) : void
Parameters
$iblockId : int

Iblock identifier.

$id : int

Element identifier.

get()

Returns the queue elements for the given iblock which were not queried from the database.

public get(int $iblockId) : mixed
Parameters
$iblockId : int

Iblock identifier.

Tags
@return

array[integer]integer

getElement()

Returns data of the element from the queue.

public getElement(int $iblockId, int $id) : false|null|array<string|int, mixed>

False when element was not queried from the database. And null when element was not queued.

Parameters
$iblockId : int

Iblock identifier.

$id : int

Element identifier.

Return values
false|null|array<string|int, mixed>

getInstance()

Returns a queue instance by the key provided.

public static getInstance(string $key) : ValuesQueue

Creates new instance if first time called for the given key.

Parameters
$key : string

Queue identifier.

Return values
ValuesQueue

set()

Stores the values for queue elements for future reference.

public set(int $iblockId, mixed $values) : void

Missing elements are assigned empty arrays.

Parameters
$iblockId : int

Iblock identifier.

$values : mixed

Values from the database.

setElement()

Stores the data for the element in the queue.

public setElement(int $iblockId, int $id, array<string|int, mixed> $value) : void

Rewrites any existing value.

Parameters
$iblockId : int

Iblock identifier.

$id : int

Element identifier.

$value : array<string|int, mixed>

A Value to be stored.


        
On this page

Search results