comparison 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
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
1 <?php
2
3 namespace Consolidation\AnnotatedCommand\Input;
4
5 /**
6 * StdinAwareTrait provides the implementation for StdinAwareInterface.
7 */
8 trait StdinAwareTrait
9 {
10 protected $stdinHandler;
11
12 /**
13 * @inheritdoc
14 */
15 public function setStdinHandler(StdinHandler $stdin)
16 {
17 $this->stdinHandler = $stdin;
18 }
19
20 /**
21 * @inheritdoc
22 */
23 public function stdin()
24 {
25 if (!$this->stdinHandler) {
26 $this->stdinHandler = new StdinHandler();
27 }
28 return $this->stdinHandler;
29 }
30 }