summaryrefslogtreecommitdiff
path: root/vendor/symfony/console/Input/InputInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/console/Input/InputInterface.php')
-rw-r--r--vendor/symfony/console/Input/InputInterface.php39
1 files changed, 22 insertions, 17 deletions
diff --git a/vendor/symfony/console/Input/InputInterface.php b/vendor/symfony/console/Input/InputInterface.php
index f83b8856..e2412d71 100644
--- a/vendor/symfony/console/Input/InputInterface.php
+++ b/vendor/symfony/console/Input/InputInterface.php
@@ -11,6 +11,9 @@
namespace Symfony\Component\Console\Input;
+use Symfony\Component\Console\Exception\InvalidArgumentException;
+use Symfony\Component\Console\Exception\RuntimeException;
+
/**
* InputInterface is the interface implemented by all input classes.
*
@@ -31,11 +34,12 @@ interface InputInterface
* This method is to be used to introspect the input parameters
* before they have been validated. It must be used carefully.
*
- * @param string|array $values The values to look for in the raw parameters (can be an array)
+ * @param string|array $values The values to look for in the raw parameters (can be an array)
+ * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
*
* @return bool true if the value is contained in the raw parameters
*/
- public function hasParameterOption($values);
+ public function hasParameterOption($values, $onlyParams = false);
/**
* Returns the value of a raw option (not parsed).
@@ -43,26 +47,23 @@ interface InputInterface
* This method is to be used to introspect the input parameters
* before they have been validated. It must be used carefully.
*
- * @param string|array $values The value(s) to look for in the raw parameters (can be an array)
- * @param mixed $default The default value to return if no result is found
+ * @param string|array $values The value(s) to look for in the raw parameters (can be an array)
+ * @param mixed $default The default value to return if no result is found
+ * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal
*
* @return mixed The option value
*/
- public function getParameterOption($values, $default = false);
+ public function getParameterOption($values, $default = false, $onlyParams = false);
/**
* Binds the current Input instance with the given arguments and options.
- *
- * @param InputDefinition $definition A InputDefinition instance
*/
public function bind(InputDefinition $definition);
/**
- * Validates if arguments given are correct.
+ * Validates the input.
*
- * Throws an exception when not enough arguments are given.
- *
- * @throws \RuntimeException
+ * @throws RuntimeException When not enough arguments are given
*/
public function validate();
@@ -74,11 +75,13 @@ interface InputInterface
public function getArguments();
/**
- * Gets argument by name.
+ * Returns the argument value for a given argument name.
+ *
+ * @param string $name The argument name
*
- * @param string $name The name of the argument
+ * @return mixed The argument value
*
- * @return mixed
+ * @throws InvalidArgumentException When argument given doesn't exist
*/
public function getArgument($name);
@@ -109,11 +112,13 @@ interface InputInterface
public function getOptions();
/**
- * Gets an option by name.
+ * Returns the option value for a given option name.
+ *
+ * @param string $name The option name
*
- * @param string $name The name of the option
+ * @return mixed The option value
*
- * @return mixed
+ * @throws InvalidArgumentException When option given doesn't exist
*/
public function getOption($name);