37 $this->replace($items);
50 public function set(
$key, $value)
63 public function get(
$key, $default = null)
75 foreach ($items as
$key => $value) {
76 $this->
set(
$key, $value);
97 return array_keys($this->
data);
109 return array_key_exists(
$key, $this->
data);
143 return $this->has(
$key);
155 return $this->
get(
$key);
166 $this->
set(
$key, $value);
186 return count($this->
data);
offsetSet($key, $value)
Set collection item.
offsetGet($key)
Get collection item for key.
replace(array $items)
Add item to collection, replacing existing items with the same data key.
keys()
Get collection keys.
offsetExists($key)
Does this collection have a given key?
__construct(array $items=[])
Create new collection.
has($key)
Does this collection have a given key?
all()
Get all items in collection.
getIterator()
Get collection iterator.
Create styles array
The data for the language used.
count()
Get number of items in collection.
Slim Framework (https://slimframework.com)
offsetUnset($key)
Remove item from collection.
clear()
Remove all items from collection.