| 1 | <?php |
||
| 7 | final class NativeRenderer implements QueryStringRendererInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var int |
||
| 11 | */ |
||
| 12 | private $encoding; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string|null |
||
| 16 | */ |
||
| 17 | private $separator; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * NativeRenderer constructor. |
||
| 21 | * @param int $encoding |
||
| 22 | */ |
||
| 23 | protected function __construct(int $encoding) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return NativeRenderer |
||
| 30 | */ |
||
| 31 | public static function rfc1738(): self |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return NativeRenderer |
||
| 38 | */ |
||
| 39 | public static function rfc3986(): self |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return int |
||
| 46 | */ |
||
| 47 | public function getEncoding(): int |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param int $encoding |
||
| 54 | * @return NativeRenderer |
||
| 55 | */ |
||
| 56 | public function withEncoding(int $encoding): QueryStringRendererInterface |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return null|string |
||
| 67 | */ |
||
| 68 | public function getSeparator(): ?string |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @param null|string $separator |
||
| 75 | * @return QueryString |
||
| 76 | */ |
||
| 77 | public function withSeparator(?string $separator): QueryStringRendererInterface |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @inheritDoc |
||
| 86 | */ |
||
| 87 | public function render(QueryString $queryString): string |
||
| 96 | } |
||
| 97 |