$segments->set()
Adds a new element to the collection
$segments->set(array|string $key, Kirby\Query\Segment|null $value = null): Kirby\Query\Segments
Parameters
Name | Type | Default |
---|---|---|
$keyrequired | array orstring |
no default value |
$value | Kirby\Query\Segment ornull |
null
|
Return type
This method modifies the existing $segments
object it is applied to and returns it again.
Parent class
Kirby\Query\Segments
inherited from Kirby\Toolkit\Collection