BaseArray
Borrowed from ramsey/collection
- Full name:
\Qubus\Support\Collection\BaseArray
- This class implements:
\Qubus\Support\Collection\Arrayable
- This class is an Abstract class
Properties
items
The items of this array.
Methods
__construct
Constructs a new array object.
Parameters:
Parameter | Type | Description |
---|---|---|
$items | array | The initial items to add to array. |
getIterator
Returns array as iterator.
offsetExists
Returns true
if the given offset exists in the array.
Parameters:
Parameter | Type | Description |
---|---|---|
$offset | mixed | The offset to check. |
offsetGet
Returns the value at the specified offset.
Parameters:
Parameter | Type | Description |
---|---|---|
$offset | mixed | The offset for which a value should be returned. |
Return Value:
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.
Parameters:
Parameter | Type | Description |
---|---|---|
$offset | mixed | The offset to set. |
$value | mixed | The value to set at the given offset. |
offsetUnset
Removes the given offset and its value from the array.
Parameters:
Parameter | Type | Description |
---|---|---|
$offset | mixed | The offset to remove from the array. |
serialize
Returns a JSON string.
unserialize
Converts a serialized string representation into an instance object.
Parameters:
Parameter | Type | Description |
---|---|---|
$items | array | A PHP array to unserialize. |
count
Returns the number of items in the array.
clear
Removes all items from array instance.
toArray
Returns an instance as an array.
isEmpty
Returns true
if array is empty.
Automatically generated on 2025-10-13