Documentation

CouchbaseQueue
in package
implements Countable, IteratorAggregate

Implementation of the List backed by JSON document in Couchbase collection

Interfaces, Classes, Traits and Enums

Countable
IteratorAggregate

Table of Contents

$collection  : Collection
$id  : string
$options  : CouchbaseQueue
__construct()  : mixed
CouchbaseQueue constructor.
clear()  : void
Clears the queue. Effectively it removes backing document, because missing document is an equivalent of the empty collection.
count()  : int
empty()  : bool
getIterator()  : Traversable
Create new iterator to walk through the list.
pop()  : mixed
Pop entry from the FIFO queue
push()  : void
Enqueue new value to the FIFO queue

Properties

Methods

__construct()

CouchbaseQueue constructor.

public __construct(string $id, Collection $collection[, CouchbaseQueue|null $options = null ]) : mixed
Parameters
$id : string

identifier of the backing document.

$collection : Collection

collection instance, where the document will be stored

$options : CouchbaseQueue|null = null
Tags
since
4.0.0
Return values
mixed

clear()

Clears the queue. Effectively it removes backing document, because missing document is an equivalent of the empty collection.

public clear() : void
Tags
since
4.0.0
Return values
void

count()

public count() : int
Tags
since
4.0.0
Return values
int

number of elements in the list

empty()

public empty() : bool
Tags
since
4.0.0
Return values
bool

true if the list is empty

getIterator()

Create new iterator to walk through the list.

public getIterator() : Traversable

Implementation of

Tags
since
4.0.0
Return values
Traversable

iterator to enumerate elements of the list

pop()

Pop entry from the FIFO queue

public pop() : mixed
Tags
since
4.0.0
Return values
mixed

return the oldest value in the queue or null

push()

Enqueue new value to the FIFO queue

public push(mixed $value) : void
Parameters
$value : mixed

the value to insert

Tags
throws
InvalidArgumentException
since
4.0.0
Return values
void
Loading…

Search results