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

Breadcrumb

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

function InputDefinition::hasArgument

Returns true if an InputArgument object exists by name or position.

1 call to InputDefinition::hasArgument()
InputDefinition::getArgument in vendor/symfony/console/Input/InputDefinition.php
Returns an InputArgument by name or by position.

File

vendor/symfony/console/Input/InputDefinition.php, line 143

Class

InputDefinition
A InputDefinition represents a set of valid command line arguments and options.

Namespace

Symfony\Component\Console\Input

Code

public function hasArgument(string|int $name) : bool {
    $arguments = \is_int($name) ? array_values($this->arguments) : $this->arguments;
    return isset($arguments[$name]);
}
RSS feed
Powered by Drupal