Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 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\Output;
13
 
14
use Symfony\Component\Console\Formatter\NullOutputFormatter;
15
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
16
 
17
/**
18
 * NullOutput suppresses all output.
19
 *
20
 *     $output = new NullOutput();
21
 *
22
 * @author Fabien Potencier <fabien@symfony.com>
23
 * @author Tobias Schultze <http://tobion.de>
24
 */
25
class NullOutput implements OutputInterface
26
{
27
    private NullOutputFormatter $formatter;
28
 
29
    public function setFormatter(OutputFormatterInterface $formatter)
30
    {
31
        // do nothing
32
    }
33
 
34
    public function getFormatter(): OutputFormatterInterface
35
    {
36
        // to comply with the interface we must return a OutputFormatterInterface
37
        return $this->formatter ??= new NullOutputFormatter();
38
    }
39
 
40
    public function setDecorated(bool $decorated)
41
    {
42
        // do nothing
43
    }
44
 
45
    public function isDecorated(): bool
46
    {
47
        return false;
48
    }
49
 
50
    public function setVerbosity(int $level)
51
    {
52
        // do nothing
53
    }
54
 
55
    public function getVerbosity(): int
56
    {
57
        return self::VERBOSITY_QUIET;
58
    }
59
 
60
    public function isQuiet(): bool
61
    {
62
        return true;
63
    }
64
 
65
    public function isVerbose(): bool
66
    {
67
        return false;
68
    }
69
 
70
    public function isVeryVerbose(): bool
71
    {
72
        return false;
73
    }
74
 
75
    public function isDebug(): bool
76
    {
77
        return false;
78
    }
79
 
80
    public function writeln(string|iterable $messages, int $options = self::OUTPUT_NORMAL)
81
    {
82
        // do nothing
83
    }
84
 
85
    public function write(string|iterable $messages, bool $newline = false, int $options = self::OUTPUT_NORMAL)
86
    {
87
        // do nothing
88
    }
89
}