source: pro-violet-viettel/sourcecode/application/libraries/Doctrine/Symfony/Component/Console/Output/OutputInterface.php @ 361

Last change on this file since 361 was 345, checked in by quyenla, 11 years ago

collaborator page

File size: 2.4 KB
Line 
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 *
21 * @api
22 */
23interface OutputInterface
24{
25    const VERBOSITY_QUIET   = 0;
26    const VERBOSITY_NORMAL  = 1;
27    const VERBOSITY_VERBOSE = 2;
28
29    const OUTPUT_NORMAL = 0;
30    const OUTPUT_RAW = 1;
31    const OUTPUT_PLAIN = 2;
32
33    /**
34     * Writes a message to the output.
35     *
36     * @param string|array $messages The message as an array of lines of a single string
37     * @param Boolean      $newline  Whether to add a newline or not
38     * @param integer      $type     The type of output
39     *
40     * @throws \InvalidArgumentException When unknown output type is given
41     *
42     * @api
43     */
44    function write($messages, $newline = false, $type = 0);
45
46    /**
47     * Writes a message to the output and adds a newline at the end.
48     *
49     * @param string|array $messages The message as an array of lines of a single string
50     * @param integer      $type     The type of output
51     *
52     * @api
53     */
54    function writeln($messages, $type = 0);
55
56    /**
57     * Sets the verbosity of the output.
58     *
59     * @param integer $level The level of verbosity
60     *
61     * @api
62     */
63    function setVerbosity($level);
64
65    /**
66     * Gets the current verbosity of the output.
67     *
68     * @return integer The current level of verbosity
69     */
70    function getVerbosity();
71
72    /**
73     * Sets the decorated flag.
74     *
75     * @param Boolean $decorated Whether to decorated the messages or not
76     *
77     * @api
78     */
79    function setDecorated($decorated);
80
81    /**
82     * Gets the decorated flag.
83     *
84     * @return Boolean true if the output will decorate messages, false otherwise
85     *
86     * @api
87     */
88    function isDecorated();
89
90    /**
91     * Sets output formatter.
92     *
93     * @param OutputFormatterInterface $formatter
94     *
95     * @api
96     */
97    function setFormatter(OutputFormatterInterface $formatter);
98
99    /**
100     * Returns current output formatter instance.
101     *
102     * @return  OutputFormatterInterface
103     *
104     * @api
105     */
106    function getFormatter();
107}
Note: See TracBrowser for help on using the repository browser.