[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
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 * 41 * @return bool true if the value is contained in the raw parameters 42 */ 43 public function hasParameterOption($values); 44 45 /** 46 * Returns the value of a raw option (not parsed). 47 * 48 * This method is to be used to introspect the input parameters 49 * before they have been validated. It must be used carefully. 50 * Does not necessarily return the correct result for short options 51 * when multiple flags are combined in the same option. 52 * 53 * @param string|array $values The value(s) to look for in the raw parameters (can be an array) 54 * @param mixed $default The default value to return if no result is found 55 * 56 * @return mixed The option value 57 */ 58 public function getParameterOption($values, $default = false); 59 60 /** 61 * Binds the current Input instance with the given arguments and options. 62 * 63 * @throws RuntimeException 64 */ 65 public function bind(InputDefinition $definition); 66 67 /** 68 * Validates the input. 69 * 70 * @throws RuntimeException When not enough arguments are given 71 */ 72 public function validate(); 73 74 /** 75 * Returns all the given arguments merged with the default values. 76 * 77 * @return array 78 */ 79 public function getArguments(); 80 81 /** 82 * Returns the argument value for a given argument name. 83 * 84 * @param string $name The argument name 85 * 86 * @return string|string[]|null The argument value 87 * 88 * @throws InvalidArgumentException When argument given doesn't exist 89 */ 90 public function getArgument($name); 91 92 /** 93 * Sets an argument value by name. 94 * 95 * @param string $name The argument name 96 * @param string|string[]|null $value The argument value 97 * 98 * @throws InvalidArgumentException When argument given doesn't exist 99 */ 100 public function setArgument($name, $value); 101 102 /** 103 * Returns true if an InputArgument object exists by name or position. 104 * 105 * @param string|int $name The InputArgument name or position 106 * 107 * @return bool true if the InputArgument object exists, false otherwise 108 */ 109 public function hasArgument($name); 110 111 /** 112 * Returns all the given options merged with the default values. 113 * 114 * @return array 115 */ 116 public function getOptions(); 117 118 /** 119 * Returns the option value for a given option name. 120 * 121 * @param string $name The option name 122 * 123 * @return string|string[]|bool|null The option value 124 * 125 * @throws InvalidArgumentException When option given doesn't exist 126 */ 127 public function getOption($name); 128 129 /** 130 * Sets an option value by name. 131 * 132 * @param string $name The option name 133 * @param string|string[]|bool|null $value The option value 134 * 135 * @throws InvalidArgumentException When option given doesn't exist 136 */ 137 public function setOption($name, $value); 138 139 /** 140 * Returns true if an InputOption object exists by name. 141 * 142 * @param string $name The InputOption name 143 * 144 * @return bool true if the InputOption object exists, false otherwise 145 */ 146 public function hasOption($name); 147 148 /** 149 * Is this input means interactive? 150 * 151 * @return bool 152 */ 153 public function isInteractive(); 154 155 /** 156 * Sets the input interactivity. 157 * 158 * @param bool $interactive If the input should be interactive 159 */ 160 public function setInteractive($interactive); 161 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |