ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
interface.ilBuddySystemCollection.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29interface ilBuddySystemCollection extends Countable, IteratorAggregate, ArrayAccess
30{
35 public function add(mixed $element): void;
36
42 public function remove(string|int $key): void;
43
49 public function removeElement(mixed $element): void;
50
56 public function containsKey(string|int $key): bool;
57
64 public function getKey(mixed $element): string|int;
65
69 public function clear(): void;
70
75 public function contains(mixed $element): bool;
76
82 public function get(string|int $key): mixed;
83
89 public function set(string|int $key, mixed $value): void;
90
94 public function isEmpty(): bool;
95
101 public function getKeys(): array;
102
108 public function getValues(): array;
109
113 public function filter(callable $callable): self;
114
122 public function slice(int $offset, ?int $length = null): self;
123
128 public function toArray(): array;
129
130 public function equals(mixed $other): bool;
131}
Interface ilBuddySystemCollection.
clear()
Clears the list.
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.
getKey(mixed $element)
equals(mixed $other)
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.