StreamableInputInterface.php 873 B

12345678910111213141516171819202122232425262728293031323334353637
  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. public function setStream($stream);
  27. /**
  28. * Returns the input stream.
  29. *
  30. * @return resource|null
  31. */
  32. public function getStream();
  33. }