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

Breadcrumb

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

function InputBag::getString

Returns the parameter value converted to string.

Overrides ParameterBag::getString

File

vendor/symfony/http-foundation/InputBag.php, line 101

Class

InputBag
InputBag is a container for user input values such as $_GET, $_POST, $_REQUEST, and $_COOKIE.

Namespace

Symfony\Component\HttpFoundation

Code

public function getString(string $key, string $default = '') : string {
    // Shortcuts the parent method because the validation on scalar is already done in get().
    return (string) $this->get($key, $default);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal