public function ParameterBag::getInt

Returns the parameter value converted to integer.

@api

Parameters

string $key The parameter key:

mixed $default The default value if the parameter key does not exist:

boolean $deep If true, a path like foo[bar] will find deeper items:

Return value

integer The filtered value

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ParameterBag.php, line 251

Class

ParameterBag
ParameterBag is a container for key/value pairs.

Namespace

Symfony\Component\HttpFoundation

Code

public function getInt($key, $default = 0, $deep = false) {
  return (int) $this
    ->get($key, $default, $deep);
}