summaryrefslogtreecommitdiff
path: root/vendor/symfony/console/Output/OutputInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/console/Output/OutputInterface.php')
-rw-r--r--vendor/symfony/console/Output/OutputInterface.php100
1 files changed, 100 insertions, 0 deletions
diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php
new file mode 100644
index 0000000..41315fb
--- /dev/null
+++ b/vendor/symfony/console/Output/OutputInterface.php
@@ -0,0 +1,100 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Console\Output;
13
14use Symfony\Component\Console\Formatter\OutputFormatterInterface;
15
16/**
17 * OutputInterface is the interface implemented by all Output classes.
18 *
19 * @author Fabien Potencier <fabien@symfony.com>
20 */
21interface OutputInterface
22{
23 public const VERBOSITY_QUIET = 16;
24 public const VERBOSITY_NORMAL = 32;
25 public const VERBOSITY_VERBOSE = 64;
26 public const VERBOSITY_VERY_VERBOSE = 128;
27 public const VERBOSITY_DEBUG = 256;
28
29 public const OUTPUT_NORMAL = 1;
30 public const OUTPUT_RAW = 2;
31 public const OUTPUT_PLAIN = 4;
32
33 /**
34 * Writes a message to the output.
35 *
36 * @param bool $newline Whether to add a newline
37 * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants),
38 * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
39 */
40 public function write(string|iterable $messages, bool $newline = false, int $options = 0): void;
41
42 /**
43 * Writes a message to the output and adds a newline at the end.
44 *
45 * @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants),
46 * 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
47 */
48 public function writeln(string|iterable $messages, int $options = 0): void;
49
50 /**
51 * Sets the verbosity of the output.
52 *
53 * @param self::VERBOSITY_* $level
54 */
55 public function setVerbosity(int $level): void;
56
57 /**
58 * Gets the current verbosity of the output.
59 *
60 * @return self::VERBOSITY_*
61 */
62 public function getVerbosity(): int;
63
64 /**
65 * Returns whether verbosity is quiet (-q).
66 */
67 public function isQuiet(): bool;
68
69 /**
70 * Returns whether verbosity is verbose (-v).
71 */
72 public function isVerbose(): bool;
73
74 /**
75 * Returns whether verbosity is very verbose (-vv).
76 */
77 public function isVeryVerbose(): bool;
78
79 /**
80 * Returns whether verbosity is debug (-vvv).
81 */
82 public function isDebug(): bool;
83
84 /**
85 * Sets the decorated flag.
86 */
87 public function setDecorated(bool $decorated): void;
88
89 /**
90 * Gets the decorated flag.
91 */
92 public function isDecorated(): bool;
93
94 public function setFormatter(OutputFormatterInterface $formatter): void;
95
96 /**
97 * Returns current output formatter instance.
98 */
99 public function getFormatter(): OutputFormatterInterface;
100}