GenericArray
class GenericArray extends AbstractArray (View source)
GenericArray represents a standard array object
Properties
protected array | $data | from AbstractArray |
Methods
Checks whether the specified offset exists in the array
Returns the value stored at the specified offset in the array
Sets the specified offset in the map with the given value
Removes the specified offset and its value from the map
Converts this map object to a string when the object is serialized
with serialize()
Re-constructs the object from its serialized form
Returns a native PHP array containing all of the elements in this array object
Details
in AbstractArray at line 33
__construct(array $data = [])
Constructs a new array object
in AbstractArray at line 48
ArrayIterator
getIterator()
Returns a new iterator from this array
in AbstractArray at line 60
bool
offsetExists(mixed $offset)
Checks whether the specified offset exists in the array
in AbstractArray at line 72
mixed
offsetGet(mixed $offset)
Returns the value stored at the specified offset in the array
in AbstractArray at line 85
offsetSet(mixed $offset, mixed $value)
Sets the specified offset in the map with the given value
in AbstractArray at line 100
offsetUnset(mixed $offset)
Removes the specified offset and its value from the map
in AbstractArray at line 112
string
serialize()
Converts this map object to a string when the object is serialized
with serialize()
in AbstractArray at line 123
unserialize(string $serialized)
Re-constructs the object from its serialized form
in AbstractArray at line 134
int
count()
Returns the number of elements contained in this array
in AbstractArray at line 139
void
clear()
Remove all the elements from this array object
in AbstractArray at line 144
toArray()
Returns a native PHP array containing all of the elements in this array object
in AbstractArray at line 149
bool
isEmpty()
Returns true
if this array object contains no elements