FileAccess Orion

AbstractArray
in package
implements ArrayInterface

This class provides a basic implementation of `ArrayInterface`, to minimize the effort required to implement this interface.

Interfaces, Classes, Traits and Enums

ArrayInterface
`ArrayInterface` provides traversable array functionality to data types.

Table of Contents

$data  : array<string|int, mixed>
The items of this array.
__construct()  : mixed
Constructs a new array object.
clear()  : void
Removes all items from this array.
count()  : int
Returns the number of items in this array.
getIterator()  : ArrayIterator<mixed, mixed>
Returns an iterator for this array.
isEmpty()  : bool
Returns `true` if this array is empty.
offsetExists()  : bool
Returns `true` if the given offset exists in this array.
offsetGet()  : mixed|null
Returns the value at the specified offset.
offsetSet()  : void
Sets the given value to the given offset in the array.
offsetUnset()  : void
Removes the given offset and its value from the array.
serialize()  : string
Returns a serialized string representation of this array object.
toArray()  : array<string|int, mixed>
Returns a native PHP array representation of this array object.
unserialize()  : void
Converts a serialized string representation into an instance object.

Properties

$data

The items of this array.

protected array<string|int, mixed> $data = []

Methods

__construct()

Constructs a new array object.

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []

The initial items to add to this array.

Return values
mixed

clear()

Removes all items from this array.

public clear() : void
Return values
void

isEmpty()

Returns `true` if this array is empty.

public isEmpty() : bool
Return values
bool

offsetExists()

Returns `true` if the given offset exists in this array.

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

The offset to check.

Tags
link

ArrayAccess::offsetExists()

Return values
bool

offsetGet()

Returns the value at the specified offset.

public offsetGet(mixed $offset) : mixed|null
Parameters
$offset : mixed

The offset for which a value should be returned.

Tags
link

ArrayAccess::offsetGet()

Return values
mixed|null

the value stored at the offset, or null if the offset does not exist.

offsetSet()

Sets the given value to the given offset in the array.

public offsetSet(mixed|null $offset, mixed $value) : void
Parameters
$offset : mixed|null

The offset to set. If null, the value may be set at a numerically-indexed offset.

$value : mixed

The value to set at the given offset.

Tags
link

ArrayAccess::offsetSet()

Return values
void

offsetUnset()

Removes the given offset and its value from the array.

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

The offset to remove from the array.

Tags
link

ArrayAccess::offsetUnset()

Return values
void

toArray()

Returns a native PHP array representation of this array object.

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

unserialize()

Converts a serialized string representation into an instance object.

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

A PHP serialized string to unserialize.

Tags
link

Serializable::unserialize()

phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint

Return values
void

Search results