Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ParameterBag.php

function ParameterBag::getDigits

Returns the digits of the parameter value.

File

vendor/symfony/http-foundation/ParameterBag.php, line 118

Class

ParameterBag
ParameterBag is a container for key/value pairs.

Namespace

Symfony\Component\HttpFoundation

Code

public function getDigits(string $key, string $default = '') : string {
    return preg_replace('/[^[:digit:]]/', '', $this->getString($key, $default));
}
RSS feed
Powered by Drupal