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

Breadcrumb

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

function Input::escapeToken

Escapes a token through escapeshellarg if it contains unsafe chars.

2 calls to Input::escapeToken()
ArgvInput::__toString in vendor/symfony/console/Input/ArgvInput.php
Returns a stringified representation of the args passed to the command.
ArrayInput::__toString in vendor/symfony/console/Input/ArrayInput.php
Returns a stringified representation of the args passed to the command.

File

vendor/symfony/console/Input/Input.php, line 154

Class

Input
Input is the base class for all concrete Input classes.

Namespace

Symfony\Component\Console\Input

Code

public function escapeToken(string $token) : string {
    return preg_match('{^[\\w-]+$}', $token) ? $token : escapeshellarg($token);
}

API Navigation

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