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

Breadcrumb

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

function ArgvInput::getRawTokens

Returns un-parsed and not validated tokens.

Parameters

bool $strip Whether to return the raw parameters (false) or the values after the command name (true):

Return value

list<string>

File

vendor/symfony/console/Input/ArgvInput.php, line 361

Class

ArgvInput
ArgvInput represents an input coming from the CLI arguments.

Namespace

Symfony\Component\Console\Input

Code

public function getRawTokens(bool $strip = false) : array {
    if (!$strip) {
        return $this->tokens;
    }
    $parameters = [];
    $keep = false;
    foreach ($this->tokens as $value) {
        if (!$keep && $value === $this->getFirstArgument()) {
            $keep = true;
            continue;
        }
        if ($keep) {
            $parameters[] = $value;
        }
    }
    return $parameters;
}

API Navigation

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