StreamableInputInterface.php 900 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Console\Input;
  11. /**
  12. * StreamableInputInterface is the interface implemented by all input classes
  13. * that have an input stream.
  14. *
  15. * @author Robin Chalas <robin.chalas@gmail.com>
  16. */
  17. interface StreamableInputInterface extends InputInterface
  18. {
  19. /**
  20. * Sets the input stream to read from when interacting with the user.
  21. *
  22. * This is mainly useful for testing purpose.
  23. *
  24. * @param resource $stream The input stream
  25. *
  26. * @return void
  27. */
  28. public function setStream($stream);
  29. /**
  30. * Returns the input stream.
  31. *
  32. * @return resource|null
  33. */
  34. public function getStream();
  35. }