Documentation

AbstractIndexCollection implements CollectionInterface uses Serializable

AbstractYes

Abstract Index Collection.

Tags
template
template
template
implements

Table of Contents

Interfaces

CollectionInterface
Collection Interface.

Properties

$entries  : array<string|int, mixed>

Methods

__construct()  : mixed
Initializes a new IndexCollection.
__serialize()  : array<string|int, mixed>
__toString()  : string
Returns a string representation of this object.
__unserialize()  : void
add()  : mixed
{@inheritDoc}
chunk()  : array<string|int, mixed>
Split collection into chunks.
clear()  : mixed
{@inheritDoc}
contains()  : mixed
{@inheritDoc}
containsKey()  : mixed
{@inheritDoc}
count()  : mixed
{@inheritDoc}
current()  : mixed
{@inheritDoc}
exists()  : mixed
{@inheritDoc}
filter()  : mixed
{@inheritDoc}
first()  : mixed
{@inheritDoc}
forAll()  : mixed
{@inheritDoc}
get()  : mixed
{@inheritDoc}
getIterator()  : mixed
Required by interface IteratorAggregate.
getKeys()  : mixed
{@inheritDoc}
getValues()  : mixed
{@inheritDoc}
indexOf()  : mixed
{@inheritDoc}
isEmpty()  : mixed
{@inheritDoc}
jsonSerialize()  : array<string|int, mixed>
Implements JsonSerializable interface.
key()  : mixed
{@inheritDoc}
last()  : mixed
{@inheritDoc}
limit()  : static
map()  : mixed
{@inheritDoc}
next()  : mixed
{@inheritDoc}
offsetExists()  : bool
Required by interface ArrayAccess.
offsetGet()  : mixed
Required by interface ArrayAccess.
offsetSet()  : void
Required by interface ArrayAccess.
offsetUnset()  : void
Required by interface ArrayAccess.
partition()  : mixed
{@inheritDoc}
remove()  : mixed
{@inheritDoc}
removeElement()  : mixed
{@inheritDoc}
reverse()  : static
Reverse the order of the items.
select()  : static
Select items from collection.
serialize()  : string
set()  : mixed
{@inheritDoc}
shuffle()  : static
Shuffle items.
slice()  : mixed
{@inheritDoc}
toArray()  : mixed
{@inheritDoc}
unselect()  : static
Un-select items from collection.
unserialize()  : void
createFrom()  : static
Creates a new instance from the specified elements.
getCurrentKey()  : string
getElementMeta()  : mixed
getEntries()  : array<string|int, mixed>
getUnserializeAllowedClasses()  : array<string|int, mixed>|bool
isAllowedElement()  : bool
loadCollection()  : CollectionInterface
loadElement()  : mixed|null
loadElements()  : array<string|int, mixed>
setEntries()  : void

Properties

Methods

__construct()

Initializes a new IndexCollection.

public __construct([array<string|int, mixed> $entries = [] ]) : mixed
Parameters
$entries : array<string|int, mixed> = []
Tags
phpstan-param

array<TKey,T> $entries

__serialize()

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

__toString()

Returns a string representation of this object.

public __toString() : string
Attributes
#[ReturnTypeWillChange]
Return values
string

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

chunk()

Split collection into chunks.

public chunk(int $size) : array<string|int, mixed>
Parameters
$size : int

Size of each chunk.

Tags
phpstan-return

array<array<TKey,T>>

Return values
array<string|int, mixed>

getIterator()

Required by interface IteratorAggregate.

public getIterator() : mixed
Tags
phpstan-return

Iterator<TKey,T>

Attributes
#[ReturnTypeWillChange]

jsonSerialize()

Implements JsonSerializable interface.

public jsonSerialize() : array<string|int, mixed>
Attributes
#[ReturnTypeWillChange]
Return values
array<string|int, mixed>

limit()

public limit(int $start[, int|null $limit = null ]) : static
Parameters
$start : int
$limit : int|null = null
Tags
phpstan-return

static<TKey,T,C>

Return values
static

offsetExists()

Required by interface ArrayAccess.

public offsetExists(string|int|null $offset) : bool
Parameters
$offset : string|int|null
Tags
phpstan-param

TKey|null $offset

Attributes
#[ReturnTypeWillChange]
Return values
bool

offsetGet()

Required by interface ArrayAccess.

public offsetGet(string|int|null $offset) : mixed
Parameters
$offset : string|int|null
Tags
phpstan-param

TKey|null $offset

Attributes
#[ReturnTypeWillChange]

offsetSet()

Required by interface ArrayAccess.

public offsetSet(string|int|null $offset, mixed $value) : void
Parameters
$offset : string|int|null
$value : mixed
Tags
phpstan-param

TKey|null $offset

Attributes
#[ReturnTypeWillChange]

offsetUnset()

Required by interface ArrayAccess.

public offsetUnset(string|int|null $offset) : void
Parameters
$offset : string|int|null
Tags
phpstan-param

TKey|null $offset

Attributes
#[ReturnTypeWillChange]

removeElement()

{@inheritDoc}

public removeElement(mixed $element) : mixed
Parameters
$element : mixed

reverse()

Reverse the order of the items.

public reverse() : static
Tags
phpstan-return

static<TKey,T,C>

Return values
static

select()

Select items from collection.

public select(array<string|int, mixed> $keys) : static

Collection is returned in the order of $keys given to the function.

Parameters
$keys : array<string|int, mixed>
Tags
phpstan-return

static<TKey,T,C>

Return values
static

serialize()

public final serialize() : string
Return values
string

set()

{@inheritDoc}

public set(mixed $key, mixed $value) : mixed
Parameters
$key : mixed
$value : mixed

shuffle()

Shuffle items.

public shuffle() : static
Tags
phpstan-return

static<TKey,T,C>

Return values
static

slice()

{@inheritDoc}

public slice(mixed $offset[, mixed $length = null ]) : mixed
Parameters
$offset : mixed
$length : mixed = null

unselect()

Un-select items from collection.

public unselect(array<string|int, mixed> $keys) : static
Parameters
$keys : array<string|int, mixed>
Tags
phpstan-return

static<TKey,T,C>

Return values
static

unserialize()

public final unserialize(string $serialized) : void
Parameters
$serialized : string

createFrom()

Creates a new instance from the specified elements.

protected createFrom(array<string|int, mixed> $entries) : static

This method is provided for derived classes to specify how a new instance should be created when constructor semantics have changed.

Parameters
$entries : array<string|int, mixed>

Elements.

Tags
phpstan-return

static<TKey,T,C>

Return values
static

getElementMeta()

protected abstract getElementMeta(mixed $element) : mixed
Parameters
$element : mixed

getEntries()

protected getEntries() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUnserializeAllowedClasses()

protected getUnserializeAllowedClasses() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

isAllowedElement()

protected abstract isAllowedElement(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

loadElement()

protected abstract loadElement(string $key, mixed $value) : mixed|null
Parameters
$key : string
$value : mixed
Return values
mixed|null

loadElements()

protected abstract loadElements([array<string|int, mixed>|null $entries = null ]) : array<string|int, mixed>
Parameters
$entries : array<string|int, mixed>|null = null
Tags
phpstan-return

array<TKey,T>

Return values
array<string|int, mixed>

setEntries()

protected setEntries(array<string|int, mixed> $entries) : void
Parameters
$entries : array<string|int, mixed>
Tags
phpstan-param

array<TKey,T> $entries


        
On this page

Search results