1 | <?php |
||
22 | trait VerbosityThresholdTrait |
||
23 | { |
||
24 | /** |
||
25 | * @var \Robo\Contract\OutputAdapterInterface |
||
26 | */ |
||
27 | protected $outputAdapter; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | protected $verbosityThreshold = 0; |
||
33 | |||
34 | /** |
||
35 | * Required verbosity level before any TaskIO output will be produced. |
||
36 | * e.g. OutputInterface::VERBOSITY_VERBOSE |
||
37 | * |
||
38 | * @param int $verbosityThreshold |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | public function setVerbosityThreshold($verbosityThreshold) |
||
47 | |||
48 | /** |
||
49 | * @return int |
||
50 | */ |
||
51 | public function verbosityThreshold() |
||
55 | |||
56 | public function setOutputAdapter(OutputAdapterInterface $outputAdapter) |
||
60 | |||
61 | /** |
||
62 | * @return \Robo\Contract\OutputAdapterInterface |
||
63 | */ |
||
64 | public function outputAdapter() |
||
68 | |||
69 | /** |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function hasOutputAdapter() |
||
76 | |||
77 | /** |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function verbosityMeetsThreshold() |
||
87 | |||
88 | /** |
||
89 | * Print a message if the selected verbosity level is over this task's |
||
90 | * verbosity threshold. |
||
91 | * |
||
92 | * @param string $message |
||
93 | */ |
||
94 | public function writeMessage($message) |
||
101 | } |
||
102 |