annotate vendor/consolidation/annotated-command/src/Input/StdinAwareTrait.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@17 1 <?php
Chris@17 2
Chris@17 3 namespace Consolidation\AnnotatedCommand\Input;
Chris@17 4
Chris@17 5 /**
Chris@17 6 * StdinAwareTrait provides the implementation for StdinAwareInterface.
Chris@17 7 */
Chris@17 8 trait StdinAwareTrait
Chris@17 9 {
Chris@17 10 protected $stdinHandler;
Chris@17 11
Chris@17 12 /**
Chris@17 13 * @inheritdoc
Chris@17 14 */
Chris@17 15 public function setStdinHandler(StdinHandler $stdin)
Chris@17 16 {
Chris@17 17 $this->stdinHandler = $stdin;
Chris@17 18 }
Chris@17 19
Chris@17 20 /**
Chris@17 21 * @inheritdoc
Chris@17 22 */
Chris@17 23 public function stdin()
Chris@17 24 {
Chris@17 25 if (!$this->stdinHandler) {
Chris@17 26 $this->stdinHandler = new StdinHandler();
Chris@17 27 }
Chris@17 28 return $this->stdinHandler;
Chris@17 29 }
Chris@17 30 }