[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/symfony/console/Input/ -> InputInterface.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of the Symfony package.
   5   *
   6   * (c) Fabien Potencier <[email protected]>
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Symfony\Component\Console\Input;
  13  
  14  use Symfony\Component\Console\Exception\InvalidArgumentException;
  15  use Symfony\Component\Console\Exception\RuntimeException;
  16  
  17  /**
  18   * InputInterface is the interface implemented by all input classes.
  19   *
  20   * @author Fabien Potencier <[email protected]>
  21   */
  22  interface InputInterface
  23  {
  24      /**
  25       * Returns the first argument from the raw parameters (not parsed).
  26       *
  27       * @return string|null
  28       */
  29      public function getFirstArgument();
  30  
  31      /**
  32       * Returns true if the raw parameters (not parsed) contain a value.
  33       *
  34       * This method is to be used to introspect the input parameters
  35       * before they have been validated. It must be used carefully.
  36       * Does not necessarily return the correct result for short options
  37       * when multiple flags are combined in the same option.
  38       *
  39       * @param string|array $values     The values to look for in the raw parameters (can be an array)
  40       * @param bool         $onlyParams Only check real parameters, skip those following an end of options (--) signal
  41       *
  42       * @return bool
  43       */
  44      public function hasParameterOption($values, bool $onlyParams = false);
  45  
  46      /**
  47       * Returns the value of a raw option (not parsed).
  48       *
  49       * This method is to be used to introspect the input parameters
  50       * before they have been validated. It must be used carefully.
  51       * Does not necessarily return the correct result for short options
  52       * when multiple flags are combined in the same option.
  53       *
  54       * @param string|array                     $values     The value(s) to look for in the raw parameters (can be an array)
  55       * @param string|bool|int|float|array|null $default    The default value to return if no result is found
  56       * @param bool                             $onlyParams Only check real parameters, skip those following an end of options (--) signal
  57       *
  58       * @return mixed
  59       */
  60      public function getParameterOption($values, $default = false, bool $onlyParams = false);
  61  
  62      /**
  63       * Binds the current Input instance with the given arguments and options.
  64       *
  65       * @throws RuntimeException
  66       */
  67      public function bind(InputDefinition $definition);
  68  
  69      /**
  70       * Validates the input.
  71       *
  72       * @throws RuntimeException When not enough arguments are given
  73       */
  74      public function validate();
  75  
  76      /**
  77       * Returns all the given arguments merged with the default values.
  78       *
  79       * @return array<string|bool|int|float|array|null>
  80       */
  81      public function getArguments();
  82  
  83      /**
  84       * Returns the argument value for a given argument name.
  85       *
  86       * @return mixed
  87       *
  88       * @throws InvalidArgumentException When argument given doesn't exist
  89       */
  90      public function getArgument(string $name);
  91  
  92      /**
  93       * Sets an argument value by name.
  94       *
  95       * @param mixed $value The argument value
  96       *
  97       * @throws InvalidArgumentException When argument given doesn't exist
  98       */
  99      public function setArgument(string $name, $value);
 100  
 101      /**
 102       * Returns true if an InputArgument object exists by name or position.
 103       *
 104       * @return bool
 105       */
 106      public function hasArgument(string $name);
 107  
 108      /**
 109       * Returns all the given options merged with the default values.
 110       *
 111       * @return array<string|bool|int|float|array|null>
 112       */
 113      public function getOptions();
 114  
 115      /**
 116       * Returns the option value for a given option name.
 117       *
 118       * @return mixed
 119       *
 120       * @throws InvalidArgumentException When option given doesn't exist
 121       */
 122      public function getOption(string $name);
 123  
 124      /**
 125       * Sets an option value by name.
 126       *
 127       * @param mixed $value The option value
 128       *
 129       * @throws InvalidArgumentException When option given doesn't exist
 130       */
 131      public function setOption(string $name, $value);
 132  
 133      /**
 134       * Returns true if an InputOption object exists by name.
 135       *
 136       * @return bool
 137       */
 138      public function hasOption(string $name);
 139  
 140      /**
 141       * Is this input means interactive?
 142       *
 143       * @return bool
 144       */
 145      public function isInteractive();
 146  
 147      /**
 148       * Sets the input interactivity.
 149       */
 150      public function setInteractive(bool $interactive);
 151  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer