Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
OutputStyle.php
001 <?php
002
003 /*
004 * This file is part of the Symfony package.
005 *
006 * (c) Fabien Potencier <fabien@symfony.com>
007 *
008 * For the full copyright and license information, please view the LICENSE
009 * file that was distributed with this source code.
010 */
011
012 namespace Symfony\Component\Console\Style;
013
014 use Symfony\Component\Console\Formatter\OutputFormatterInterface;
015 use Symfony\Component\Console\Helper\ProgressBar;
016 use Symfony\Component\Console\Output\ConsoleOutputInterface;
017 use Symfony\Component\Console\Output\OutputInterface;
018
019 /**
020 * Decorates output to add console style guide helpers.
021 *
022 * @author Kevin Bond <kevinbond@gmail.com>
023 */
024 abstract class OutputStyle implements OutputInterface, StyleInterface
025 {
026 private $output;
027
028 public function __construct(OutputInterface $output)
029 {
030 $this->output = $output;
031 }
032
033 /**
034 * {@inheritdoc}
035 */
036 public function newLine($count = 1)
037 {
038 $this->output->write(str_repeat(\PHP_EOL, $count));
039 }
040
041 /**
042 * @param int $max
043 *
044 * @return ProgressBar
045 */
046 public function createProgressBar($max = 0)
047 {
048 return new ProgressBar($this->output, $max);
049 }
050
051 /**
052 * {@inheritdoc}
053 */
054 public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL)
055 {
056 $this->output->write($messages, $newline, $type);
057 }
058
059 /**
060 * {@inheritdoc}
061 */
062 public function writeln($messages, $type = self::OUTPUT_NORMAL)
063 {
064 $this->output->writeln($messages, $type);
065 }
066
067 /**
068 * {@inheritdoc}
069 */
070 public function setVerbosity($level)
071 {
072 $this->output->setVerbosity($level);
073 }
074
075 /**
076 * {@inheritdoc}
077 */
078 public function getVerbosity()
079 {
080 return $this->output->getVerbosity();
081 }
082
083 /**
084 * {@inheritdoc}
085 */
086 public function setDecorated($decorated)
087 {
088 $this->output->setDecorated($decorated);
089 }
090
091 /**
092 * {@inheritdoc}
093 */
094 public function isDecorated()
095 {
096 return $this->output->isDecorated();
097 }
098
099 /**
100 * {@inheritdoc}
101 */
102 public function setFormatter(OutputFormatterInterface $formatter)
103 {
104 $this->output->setFormatter($formatter);
105 }
106
107 /**
108 * {@inheritdoc}
109 */
110 public function getFormatter()
111 {
112 return $this->output->getFormatter();
113 }
114
115 /**
116 * {@inheritdoc}
117 */
118 public function isQuiet()
119 {
120 return $this->output->isQuiet();
121 }
122
123 /**
124 * {@inheritdoc}
125 */
126 public function isVerbose()
127 {
128 return $this->output->isVerbose();
129 }
130
131 /**
132 * {@inheritdoc}
133 */
134 public function isVeryVerbose()
135 {
136 return $this->output->isVeryVerbose();
137 }
138
139 /**
140 * {@inheritdoc}
141 */
142 public function isDebug()
143 {
144 return $this->output->isDebug();
145 }
146
147 protected function getErrorOutput()
148 {
149 if (!$this->output instanceof ConsoleOutputInterface) {
150 return $this->output;
151 }
152
153 return $this->output->getErrorOutput();
154 }
155 }
156