add multiple fragment support

This commit is contained in:
Dennis Eichhorn 2020-12-19 20:31:34 +01:00
parent 7981adf359
commit 91fde08f52

View File

@ -134,6 +134,14 @@ final class HttpUri implements UriInterface
*/
public string $fragment;
/**
* Uri fragments.
*
* @var array
* @since 1.0.0
*/
public array $fragments = [];
/**
* Uri base.
*
@ -204,8 +212,9 @@ final class HttpUri implements UriInterface
$this->query = \array_change_key_case($this->query, \CASE_LOWER);
$this->fragment = $url['fragment'] ?? '';
$this->base = $this->scheme . '://' . $this->host . ($this->port !== 80 ? ':' . $this->port : '') . $this->rootPath;
$this->fragment = $url['fragment'] ?? '';
$this->fragments = \explode(',', $url['fragment'] ?? '');
$this->base = $this->scheme . '://' . $this->host . ($this->port !== 80 ? ':' . $this->port : '') . $this->rootPath;
}
/**