annotate vendor/consolidation/annotated-command/src/Input/StdinAwareTrait.php @ 4:a9cd425dd02b

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