Skip to content

Commit 24e2da6

Browse files
committed
minor #6080 Removed doc about getting original parameter value from ParameterBag (edefimov)
This PR was submitted for the 3.0 branch but it was merged into the 2.8 branch instead (closes #6080). Discussion ---------- Removed doc about getting original parameter value from ParameterBag | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 3.0 | Fixed tickets | This PR removes information about getting original parameter value using the third argument of ParameterBag::get() method. Commits ------- 1e1ecc4 Removed doc about getting original parameter value from ParameterBag
2 parents 61a4ae4 + 1e1ecc4 commit 24e2da6

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

components/http_foundation/introduction.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,22 +151,15 @@ exist::
151151

152152
When PHP imports the request query, it handles request parameters like
153153
``foo[bar]=bar`` in a special way as it creates an array. So you can get the
154-
``foo`` parameter and you will get back an array with a ``bar`` element. But
155-
sometimes, you might want to get the value for the "original" parameter name:
156-
``foo[bar]``. This is possible with all the ``ParameterBag`` getters like
157-
:method:`Symfony\\Component\\HttpFoundation\\Request::get` via the third
158-
argument::
154+
``foo`` parameter and you will get back an array with a ``bar`` element::
159155

160156
// the query string is '?foo[bar]=bar'
161157

162158
$request->query->get('foo');
163159
// returns array('bar' => 'bar')
164160

165161
$request->query->get('foo[bar]');
166-
// returns null
167-
168-
$request->query->get('foo[bar]', null, true);
169-
// returns 'bar'
162+
// returns null
170163

171164
.. _component-foundation-attributes:
172165

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy