Skip to content

Commit

Permalink
minor #6080 Removed doc about getting original parameter value from P…
Browse files Browse the repository at this point in the history
…arameterBag (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
  • Loading branch information
xabbuh committed Jan 18, 2016
2 parents 61a4ae4 + 1e1ecc4 commit 24e2da6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions components/http_foundation/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,15 @@ exist::

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

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

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

$request->query->get('foo[bar]');
// returns null

$request->query->get('foo[bar]', null, true);
// returns 'bar'
// returns null

.. _component-foundation-attributes:

Expand Down

0 comments on commit 24e2da6

Please sign in to comment.