<TKey is array-key, TValue>
Methods | ||
---|---|---|
public
|
isEmpty(): bool
|
# |
public
|
has($key): bool
|
# |
public
|
get($key)
|
# |
public
|
forEach(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE)
|
# |
public
|
find(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE | CollectionInterface::FIND_VALUE)
|
# |
public
|
hasValue($value, bool $strict = false): bool
|
# |
public
|
keyOf($value, bool $strict = false)
|
# |
public
|
firstOf($value)
|
# |
public
|
all(): array
|
# |
public
|
jsonSerialize(): array<TKey, mixed>
|
# |
public
|
toJson(int $flags = 0): string
|
# |
public
|
first()
|
# |
public
|
last()
|
# |
public
|
nth(int $n)
|
# |
public
|
getIterator(): Traversable<TKey, TValue>
|
# |
public
|
offsetExists(TKey $offset): bool
|
# |
public
|
offsetGet(TKey $offset): TValue
|
# |
public
|
count(): int
|
# |
protected
|
compareItems(TValue $a, TValue $b): int
|
# |
private
|
getCallbackValue(
int-mask-of<CollectionInterface::*> $mode,
TKey $key,
TValue $value,
): ($mode is 3|11|19 ? array{TKey, TValue} : ($mode is 2|10|18 ? TKey : TValue))
|
# |
private
|
getReturnValue(
int-mask-of<CollectionInterface::*> $mode,
TKey $key,
TValue $value,
): ($mode is 16|17|18|19 ? TKey : TValue)
|
# |
Properties | |||
---|---|---|---|
protected
|
array<TKey, TValue>
|
$Items
|
# |