[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/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 <fabien@symfony.com>
   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 <fabien@symfony.com>
  21   */
  22  interface InputInterface
  23  {
  24      /**
  25       * Returns the first argument from the raw parameters (not parsed).
  26       *
  27       * @return string|null The value of the first argument or null otherwise
  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 true if the value is contained in the raw parameters
  43       */
  44      public function hasParameterOption($values, $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 mixed        $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 The option value
  59       */
  60      public function getParameterOption($values, $default = false, $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
  80       */
  81      public function getArguments();
  82  
  83      /**
  84       * Returns the argument value for a given argument name.
  85       *
  86       * @param string $name The argument name
  87       *
  88       * @return string|string[]|null The argument value
  89       *
  90       * @throws InvalidArgumentException When argument given doesn't exist
  91       */
  92      public function getArgument($name);
  93  
  94      /**
  95       * Sets an argument value by name.
  96       *
  97       * @param string               $name  The argument name
  98       * @param string|string[]|null $value The argument value
  99       *
 100       * @throws InvalidArgumentException When argument given doesn't exist
 101       */
 102      public function setArgument($name, $value);
 103  
 104      /**
 105       * Returns true if an InputArgument object exists by name or position.
 106       *
 107       * @param string|int $name The InputArgument name or position
 108       *
 109       * @return bool true if the InputArgument object exists, false otherwise
 110       */
 111      public function hasArgument($name);
 112  
 113      /**
 114       * Returns all the given options merged with the default values.
 115       *
 116       * @return array
 117       */
 118      public function getOptions();
 119  
 120      /**
 121       * Returns the option value for a given option name.
 122       *
 123       * @param string $name The option name
 124       *
 125       * @return string|string[]|bool|null The option value
 126       *
 127       * @throws InvalidArgumentException When option given doesn't exist
 128       */
 129      public function getOption($name);
 130  
 131      /**
 132       * Sets an option value by name.
 133       *
 134       * @param string                    $name  The option name
 135       * @param string|string[]|bool|null $value The option value
 136       *
 137       * @throws InvalidArgumentException When option given doesn't exist
 138       */
 139      public function setOption($name, $value);
 140  
 141      /**
 142       * Returns true if an InputOption object exists by name.
 143       *
 144       * @param string $name The InputOption name
 145       *
 146       * @return bool true if the InputOption object exists, false otherwise
 147       */
 148      public function hasOption($name);
 149  
 150      /**
 151       * Is this input means interactive?
 152       *
 153       * @return bool
 154       */
 155      public function isInteractive();
 156  
 157      /**
 158       * Sets the input interactivity.
 159       *
 160       * @param bool $interactive If the input should be interactive
 161       */
 162      public function setInteractive($interactive);
 163  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1