Bitrix API

FixedArray implements IteratorAggregate, ArrayAccess, Countable

FinalYes

Table of Contents

Interfaces

IteratorAggregate
ArrayAccess
Countable

Methods

__construct()  : mixed
__wakeup()  : mixed
count()  : int
Count elements of an object
fromArray()  : static
Creates FixedArray from array. Does not preserve keys.
getCountOfPushedElements()  : int
Returns count of elements which were pushed by @see FixedArray::push();
getIterator()  : Iterator
getSize()  : int
Returns size of fixed array.
getSplFixedArray()  : SplFixedArray
offsetExists()  : bool
Whether a offset exists
offsetGet()  : mixed
Offset to retrieve
offsetSet()  : void
Offset to set
offsetUnset()  : void
Offset to unset
push()  : mixed
Creates new element in array like operator "[]" in array.
reverse()  : ReverseIterator
Returns iterator to reverse fixed array.
setSize()  : int
Sets size fixed array.
toArray()  : array<string|int, mixed>
Exports to array.

Methods

__construct()

public __construct(mixed $size) : mixed
Parameters
$size : mixed

fromArray()

Creates FixedArray from array. Does not preserve keys.

public static fromArray(mixed $items) : static
Parameters
$items : mixed
Return values
static

getCountOfPushedElements()

Returns count of elements which were pushed by @see FixedArray::push();

public getCountOfPushedElements() : int

It may be useful, because count(), getSize() returns value which was initialized.

Return values
int

getIterator()

public getIterator() : Iterator
Return values
Iterator

getSize()

Returns size of fixed array.

public getSize() : int
Return values
int

getSplFixedArray()

public getSplFixedArray() : SplFixedArray
Return values
SplFixedArray

offsetExists()

Whether a offset exists

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed

An offset to check for.

Tags
link
http://php.net/manual/en/arrayaccess.offsetexists.php
since
5.0.0
Return values
bool

true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

push()

Creates new element in array like operator "[]" in array.

public push(mixed $data) : mixed
Parameters
$data : mixed

Mixed data.

Tags
throws
InvalidOperationException

setSize()

Sets size fixed array.

public setSize(mixed $size) : int
Parameters
$size : mixed
Return values
int

toArray()

Exports to array.

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

        
On this page

Search results