$segments->keyOf()
Tries to find the key for the given element
$segments->keyOf(Kirby\Query\Segment $needle): int|string|false
Parameters
Name | Type | Default | Description |
---|---|---|---|
$needlerequired | Kirby\Query\Segment |
no default value | the element to search for |
Return types
int
orstring
orfalse
the name of the key or false
This method modifies the existing $segments
object it is applied to and returns it again.
Parent class
Kirby\Query\Segments
inherited from Kirby\Toolkit\Iterator