diff options
Diffstat (limited to 'vendor/symfony/console/Input/InputDefinition.php')
-rw-r--r-- | vendor/symfony/console/Input/InputDefinition.php | 63 |
1 files changed, 4 insertions, 59 deletions
diff --git a/vendor/symfony/console/Input/InputDefinition.php b/vendor/symfony/console/Input/InputDefinition.php index bd64163b..d5b99ab3 100644 --- a/vendor/symfony/console/Input/InputDefinition.php +++ b/vendor/symfony/console/Input/InputDefinition.php @@ -11,9 +11,6 @@ namespace Symfony\Component\Console\Input; -use Symfony\Component\Console\Descriptor\TextDescriptor; -use Symfony\Component\Console\Descriptor\XmlDescriptor; -use Symfony\Component\Console\Output\BufferedOutput; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\LogicException; @@ -39,8 +36,6 @@ class InputDefinition private $shortcuts; /** - * Constructor. - * * @param array $definition An array of InputArgument and InputOption instance */ public function __construct(array $definition = array()) @@ -50,8 +45,6 @@ class InputDefinition /** * Sets the definition of the input. - * - * @param array $definition The definition array */ public function setDefinition(array $definition) { @@ -98,10 +91,6 @@ class InputDefinition } /** - * Adds an InputArgument object. - * - * @param InputArgument $argument An InputArgument object - * * @throws LogicException When incorrect argument is given */ public function addArgument(InputArgument $argument) @@ -235,10 +224,6 @@ class InputDefinition } /** - * Adds an InputOption object. - * - * @param InputOption $option An InputOption object - * * @throws LogicException When option given already exist */ public function addOption(InputOption $option) @@ -284,6 +269,9 @@ class InputDefinition /** * Returns true if an InputOption object exists by name. * + * This method can't be used to check if the user included the option when + * executing the command (use getOption() instead). + * * @param string $name The InputOption name * * @return bool true if the InputOption object exists, false otherwise @@ -318,7 +306,7 @@ class InputDefinition /** * Gets an InputOption by shortcut. * - * @param string $shortcut the Shortcut name + * @param string $shortcut The Shortcut name * * @return InputOption An InputOption object */ @@ -411,47 +399,4 @@ class InputDefinition return implode(' ', $elements); } - - /** - * Returns a textual representation of the InputDefinition. - * - * @return string A string representing the InputDefinition - * - * @deprecated since version 2.3, to be removed in 3.0. - */ - public function asText() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); - - $descriptor = new TextDescriptor(); - $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); - $descriptor->describe($output, $this, array('raw_output' => true)); - - return $output->fetch(); - } - - /** - * Returns an XML representation of the InputDefinition. - * - * @param bool $asDom Whether to return a DOM or an XML string - * - * @return string|\DOMDocument An XML string representing the InputDefinition - * - * @deprecated since version 2.3, to be removed in 3.0. - */ - public function asXml($asDom = false) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); - - $descriptor = new XmlDescriptor(); - - if ($asDom) { - return $descriptor->getInputDefinitionDocument($this); - } - - $output = new BufferedOutput(); - $descriptor->describe($output, $this); - - return $output->fetch(); - } } |