The ParameterBag of Symfony HttpFoundation

Code
<?php

use Symfony\Component\HttpFoundation\Request;
use 
Symfony\Component\HttpFoundation\ParameterBag;

// Assume querystring = /path/of/route?foo=text&bar=anothertext2&qux=100
$request = new Request();

/** @var ParameterBag $parameterBag */
$parameterBag $request->query;

dump(
    
$parameterBag->keys(),
    
$parameterBag->has('foo'),
    
$parameterBag->get('qux'),
    
$parameterBag->getBoolean('qux'),
    
$parameterBag->getAlpha('bar'),
    
$parameterBag->getDigits('bar'),
    
$parameterBag->getInt('bar'),
    
// returns false if value doesn't fit to filter
    
$parameterBag->filter('bar'nullFILTER_VALIDATE_INT, ['options' => ['default' => 1]]),
    
$parameterBag->filter('qux'1FILTER_VALIDATE_INT),
    
count($parameterBag)
);
Result
array:3 [
0 => "foo"
1 => "bar"
2 => "qux"
]

true

100

false

"anothertext"

"2"

0

1

100

3
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6