Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
Reworded the example about $deep param#6390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -147,25 +147,28 @@ exist:: | ||
// the query string is '?foo=bar' | ||
$request->query->get('foo'); | ||
// returns'bar' | ||
$request->query->get('bar'); | ||
// returns null | ||
$request->query->get('bar', 'baz'); | ||
// returns 'baz' | ||
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:: | ||
// the query string is '?foo[bar]=baz' | ||
$request->query->get('foo'); | ||
// returns array('bar' => 'baz') | ||
$request->query->get('foo[bar]'); | ||
// returns null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. the only thing I don't understand is why do you keep this example since the PropertyAccessor syntax isn't possible anymore (or just deprecated in 2.8) :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. In this example the query string is | ||
$request->query->get('foo')['bar']; | ||
// returns 'baz' | ||
.. _component-foundation-attributes: | ||