19declare(strict_types=1);
35 public function add(mixed $element): void;
42 public function remove(
string|
int $key):
void;
75 public function contains(mixed $element): bool;
82 public function get(
string|
int $key): mixed;
89 public function set(
string|
int $key, mixed $value):
void;
113 public function filter(callable $callable): self;
122 public function slice(
int $offset, ?
int $length =
null): self;
130 public function equals(mixed $other): bool;
Interface ilBuddySystemCollection.
filter(callable $callable)
Returns all the elements of this collection that satisfy the predicate $callable.
removeElement(mixed $element)
add(mixed $element)
Adds an element at the end of the collection.
getKeys()
Gets all indices of the collection.
getValues()
Gets all values of the collection.
contains(mixed $element)
@phpstan-param T $element
containsKey(string|int $key)
slice(int $offset, ?int $length=null)
Extracts a slice of $length elements starting at position $offset from the Collection.