[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
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 12 namespace Symfony\Component\Console\Style; 13 14 use Symfony\Component\Console\Formatter\OutputFormatterInterface; 15 use Symfony\Component\Console\Helper\ProgressBar; 16 use Symfony\Component\Console\Output\OutputInterface; 17 18 /** 19 * Decorates output to add console style guide helpers. 20 * 21 * @author Kevin Bond <kevinbond@gmail.com> 22 */ 23 abstract class OutputStyle implements OutputInterface, StyleInterface 24 { 25 private $output; 26 27 public function __construct(OutputInterface $output) 28 { 29 $this->output = $output; 30 } 31 32 /** 33 * {@inheritdoc} 34 */ 35 public function newLine($count = 1) 36 { 37 $this->output->write(str_repeat(PHP_EOL, $count)); 38 } 39 40 /** 41 * @param int $max 42 * 43 * @return ProgressBar 44 */ 45 public function createProgressBar($max = 0) 46 { 47 return new ProgressBar($this->output, $max); 48 } 49 50 /** 51 * {@inheritdoc} 52 */ 53 public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) 54 { 55 $this->output->write($messages, $newline, $type); 56 } 57 58 /** 59 * {@inheritdoc} 60 */ 61 public function writeln($messages, $type = self::OUTPUT_NORMAL) 62 { 63 $this->output->writeln($messages, $type); 64 } 65 66 /** 67 * {@inheritdoc} 68 */ 69 public function setVerbosity($level) 70 { 71 $this->output->setVerbosity($level); 72 } 73 74 /** 75 * {@inheritdoc} 76 */ 77 public function getVerbosity() 78 { 79 return $this->output->getVerbosity(); 80 } 81 82 /** 83 * {@inheritdoc} 84 */ 85 public function setDecorated($decorated) 86 { 87 $this->output->setDecorated($decorated); 88 } 89 90 /** 91 * {@inheritdoc} 92 */ 93 public function isDecorated() 94 { 95 return $this->output->isDecorated(); 96 } 97 98 /** 99 * {@inheritdoc} 100 */ 101 public function setFormatter(OutputFormatterInterface $formatter) 102 { 103 $this->output->setFormatter($formatter); 104 } 105 106 /** 107 * {@inheritdoc} 108 */ 109 public function getFormatter() 110 { 111 return $this->output->getFormatter(); 112 } 113 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |