@@ 60-67 (lines=8) @@ | ||
57 | * |
|
58 | * @return string|null |
|
59 | */ |
|
60 | public function getAccept(Request $request, string $default = null) |
|
61 | { |
|
62 | if (null === $value = $this->acceptNegotiator->negotiate($request)) { |
|
63 | return $default; |
|
64 | } |
|
65 | ||
66 | return $value->getValue(); |
|
67 | } |
|
68 | ||
69 | /** |
|
70 | * @param Request $request |
|
@@ 75-82 (lines=8) @@ | ||
72 | * |
|
73 | * @return string|null |
|
74 | */ |
|
75 | public function getAcceptLanguage(Request $request, string $default = null) |
|
76 | { |
|
77 | if (null === $value = $this->acceptLanguageNegotiator->negotiate($request)) { |
|
78 | return $default; |
|
79 | } |
|
80 | ||
81 | return $value->getValue(); |
|
82 | } |
|
83 | ||
84 | /** |
|
85 | * @param Request $request |
|
@@ 90-97 (lines=8) @@ | ||
87 | * |
|
88 | * @return string|null |
|
89 | */ |
|
90 | public function getContentType(Request $request, string $default = null) |
|
91 | { |
|
92 | if (null === $value = $this->contentTypeNegotiator->negotiate($request)) { |
|
93 | return $default; |
|
94 | } |
|
95 | ||
96 | return $value->getValue(); |
|
97 | } |
|
98 | ||
99 | /** |
|
100 | * @param Request $request |