function AbstractArray::__construct
Constructs a new array object.
Parameters
array<array-key, T> $data The initial items to add to this array.:
8 calls to AbstractArray::__construct()
- AbstractMap::__construct in vendor/
ramsey/ collection/ src/ Map/ AbstractMap.php - AbstractMap::__construct in vendor/
ramsey/ collection/ src/ Map/ AbstractMap.php - Collection::__construct in vendor/
ramsey/ collection/ src/ Collection.php - Constructs a collection object of the specified type, optionally with the specified data.
- Collection::__construct in vendor/
ramsey/ collection/ src/ Collection.php - Constructs a collection object of the specified type, optionally with the specified data.
- Queue::__construct in vendor/
ramsey/ collection/ src/ Queue.php - Constructs a queue object of the specified type, optionally with the specified data.
4 methods override AbstractArray::__construct()
- AbstractMap::__construct in vendor/
ramsey/ collection/ src/ Map/ AbstractMap.php - Collection::__construct in vendor/
ramsey/ collection/ src/ Collection.php - Constructs a collection object of the specified type, optionally with the specified data.
- Queue::__construct in vendor/
ramsey/ collection/ src/ Queue.php - Constructs a queue object of the specified type, optionally with the specified data.
- Set::__construct in vendor/
ramsey/ collection/ src/ Set.php - Constructs a set object of the specified type, optionally with the specified data.
File
-
vendor/
ramsey/ collection/ src/ AbstractArray.php, line 43
Class
- AbstractArray
- This class provides a basic implementation of `ArrayInterface`, to minimize the effort required to implement this interface.
Namespace
Ramsey\CollectionCode
public function __construct(array $data = []) {
// Invoke offsetSet() for each value added; in this way, sub-classes
// may provide additional logic about values added to the array object.
foreach ($data as $key => $value) {
$this[$key] = $value;
}
}