<TKey is array-key, TValue>
Methods | ||
---|---|---|
public
|
set($key, $value)
|
# |
public
|
unset($key)
|
# |
public
|
add($value)
|
# |
public
|
merge($items)
|
# |
public
|
sort()
|
# |
public
|
reverse()
|
# |
public
|
map(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE)
|
# |
public
|
filter(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE)
|
# |
public
|
only(array $keys)
|
# |
public
|
onlyIn(array $index)
|
# |
public
|
except(array $keys)
|
# |
public
|
exceptIn(array $index)
|
# |
public
|
slice(int $offset, ?int $length = null)
|
# |
public
|
push(...$items)
|
# |
public
|
pop(&$last = null)
|
# |
public
|
shift(&$first = null)
|
# |
public
|
unshift(...$items)
|
# |
public
|
offsetSet(TKey|null $offset, TValue $value): void
|
# |
public
|
offsetUnset(TKey $offset): void
|
# |
protected
|
maybeReplaceItems(array<TKey, TValue> $items, bool $trustKeys = false, bool $getClone = true): static
|
# |
protected
|
replaceItems(array<TKey, TValue> $items, bool $trustKeys = false, bool $getClone = true): static
|
# |
protected
|
handleItemsReplaced(): void
|
# |