feature #13086 [Console] Define isVerbose(), etc. methods in OutputInterface (frne)

This PR was squashed before being merged into the 3.0-dev branch (closes #13086).

Discussion
----------

[Console] Define isVerbose(), etc. methods in OutputInterface

Could / should the ```Symfony\Component\Console\Output\OutputInterface``` define the methods ```isQuiet()```, ```isVerbose()```, ```isVeryVerbose()``` and ```isDebug()```?

Because the Interface already defines the verbosity constants and the ```getVerbosity()``` method, it will probalby be the right place to do so...

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

1ac95b1 [Console] Define isVerbose(), etc. methods in OutputInterface
This commit is contained in:
Fabien Potencier 2015-01-16 16:47:11 +01:00
commit 9ff47b846c

View File

@ -75,6 +75,34 @@ interface OutputInterface
*/
public function getVerbosity();
/**
* Returns whether verbosity is quiet (-q)
*
* @return bool true if verbosity is set to VERBOSITY_QUIET, false otherwise
*/
public function isQuiet();
/**
* Returns whether verbosity is verbose (-v)
*
* @return bool true if verbosity is set to VERBOSITY_VERBOSE, false otherwise
*/
public function isVerbose();
/**
* Returns whether verbosity is very verbose (-vv)
*
* @return bool true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise
*/
public function isVeryVerbose();
/**
* Returns whether verbosity is debug (-vvv)
*
* @return bool true if verbosity is set to VERBOSITY_DEBUG, false otherwise
*/
public function isDebug();
/**
* Sets the decorated flag.
*