vendor/symfony/src/Symfony/Component/Console/Output/OutputInterface.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     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\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  */
       
    23 interface 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      * @api
       
    71      */
       
    72     function getVerbosity();
       
    73 
       
    74     /**
       
    75      * Sets the decorated flag.
       
    76      *
       
    77      * @param Boolean $decorated Whether to decorated the messages or not
       
    78      *
       
    79      * @api
       
    80      */
       
    81     function setDecorated($decorated);
       
    82 
       
    83     /**
       
    84      * Gets the decorated flag.
       
    85      *
       
    86      * @return Boolean true if the output will decorate messages, false otherwise
       
    87      *
       
    88      * @api
       
    89      */
       
    90     function isDecorated();
       
    91 
       
    92     /**
       
    93      * Sets output formatter.
       
    94      *
       
    95      * @param OutputFormatterInterface $formatter
       
    96      *
       
    97      * @api
       
    98      */
       
    99     function setFormatter(OutputFormatterInterface $formatter);
       
   100 
       
   101     /**
       
   102      * Returns current output formatter instance.
       
   103      *
       
   104      * @return  OutputFormatterInterface
       
   105      *
       
   106      * @api
       
   107      */
       
   108     function getFormatter();
       
   109 }