You are here

public function InputDefinition::hasArgument in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Input/InputDefinition.php \Symfony\Component\Console\Input\InputDefinition::hasArgument()

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

Parameters

string|int $name The InputArgument name or position:

Return value

bool true if the InputArgument object exists, false otherwise

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 159

Class

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

Namespace

Symfony\Component\Console\Input

Code

public function hasArgument($name) {
  $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments;
  return isset($arguments[$name]);
}