InputInterface.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace Symfony\Component\Console\Input;
  3. /*
  4. * This file is part of the Symfony framework.
  5. *
  6. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. /**
  12. * InputInterface is the interface implemented by all input classes.
  13. *
  14. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  15. */
  16. interface InputInterface
  17. {
  18. /**
  19. * Returns the first argument from the raw parameters (not parsed).
  20. *
  21. * @return string The value of the first argument or null otherwise
  22. */
  23. function getFirstArgument();
  24. /**
  25. * Returns true if the raw parameters (not parsed) contains a value.
  26. *
  27. * This method is to be used to introspect the input parameters
  28. * before it has been validated. It must be used carefully.
  29. *
  30. * @param string $value The value to look for in the raw parameters
  31. *
  32. * @return Boolean true if the value is contained in the raw parameters
  33. */
  34. function hasParameterOption($value);
  35. /**
  36. * Binds the current Input instance with the given arguments and options.
  37. *
  38. * @param InputDefinition $definition A InputDefinition instance
  39. */
  40. function bind(InputDefinition $definition);
  41. function validate();
  42. function getArguments();
  43. function getArgument($name);
  44. function getOptions();
  45. function getOption($name);
  46. }