将查询字符串转换为 symfony2 中的关联数组

Converting query string to an associative array in symfony2

如何在symfony2中将查询字符串转换为关联数组?

我是 symfony2 的新手。
我用谷歌搜索了几个小时,但没有直接的答案(示例)。
谁能告诉我怎么做?

$request->query->all();

http://symfony.com/doc/current/components/http_foundation/introduction.html

Symfony 请求将超全局变量存储在 ParameterBag 实例中。您可以在此处查看有关 ParameterBag API 的更多信息:

http://api.symfony.com/2.7/Symfony/Component/HttpFoundation/ParameterBag.html