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

Breadcrumb

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

function InputInterface::hasParameterOption

Returns true if the raw parameters (not parsed) contain a value.

This method is to be used to introspect the input parameters before they have been validated. It must be used carefully. Does not necessarily return the correct result for short options when multiple flags are combined in the same option.

Parameters

string|array $values The values to look for in the raw parameters (can be an array):

bool $onlyParams Only check real parameters, skip those following an end of options (--) signal:

2 methods override InputInterface::hasParameterOption()
ArgvInput::hasParameterOption in vendor/symfony/console/Input/ArgvInput.php
Returns true if the raw parameters (not parsed) contain a value.
ArrayInput::hasParameterOption in vendor/symfony/console/Input/ArrayInput.php
Returns true if the raw parameters (not parsed) contain a value.

File

vendor/symfony/console/Input/InputInterface.php, line 40

Class

InputInterface
InputInterface is the interface implemented by all input classes.

Namespace

Symfony\Component\Console\Input

Code

public function hasParameterOption(string|array $values, bool $onlyParams = false) : bool;
RSS feed
Powered by Drupal