Since: 5.0.0

class ArrayReadOnlyProxy extends ArrayProxy implements ReadOnlyProxyInterface

Array read-only proxy class.

The class provides read-only feature for Array, including its children.

Properties

protected array Since: 5.0.0
$data

Data source

from  ArrayProxy

Methods

__construct(array $data)

Class constructor

bool
offsetExists(mixed $offset)

Implementation of ArrayAccess interface

mixed
offsetGet(mixed $offset)

Implementation of ArrayAccess interface

void
offsetSet(mixed $offset, mixed $value)

Implementation of ArrayAccess interface

void
offsetUnset(mixed $offset)

Implementation of ArrayAccess interface

int
count()

Implementation of Countable interface

mixed
current()

Implementation of Iterator interface

mixed
key()

Implementation of Iterator interface

void
next()

Implementation of Iterator interface

void
rewind()

Implementation of Iterator interface

bool
valid()

Implementation of Iterator interface

Details

__construct(array $data)

Since: 5.0.0

Class constructor

Parameters

array $data

The array for Proxy access

bool offsetExists(mixed $offset)

Since: 5.0.0

Implementation of ArrayAccess interface

Parameters

mixed $offset

The key to check

Return Value

bool

mixed offsetGet(mixed $offset)

Since: 5.0.0

Implementation of ArrayAccess interface

Parameters

mixed $offset

The key to get

Return Value

mixed

void offsetSet(mixed $offset, mixed $value)

Since: 5.0.0

Implementation of ArrayAccess interface

Parameters

mixed $offset

The key to set

mixed $value

The value to set

Return Value

void

Exceptions

RuntimeException

void offsetUnset(mixed $offset)

Since: 5.0.0

Implementation of ArrayAccess interface

Parameters

mixed $offset

The key to remove

Return Value

void

int count()

Since: 5.0.0

Implementation of Countable interface

Return Value

int

mixed current()

Since: 5.0.0

Implementation of Iterator interface

Return Value

mixed

mixed key()

Since: 5.0.0

Implementation of Iterator interface

Return Value

mixed

void next()

Since: 5.0.0

Implementation of Iterator interface

Return Value

void

void rewind()

Since: 5.0.0

Implementation of Iterator interface

Return Value

void

bool valid()

Since: 5.0.0

Implementation of Iterator interface

Return Value

bool