diff --git a/components/console/introduction.rst b/components/console/introduction.rst index 451b6f18722..7d579576fd3 100755 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -196,6 +196,31 @@ level. For example:: $output->writeln(...); } +.. versionadded:: 2.4 + The :method:`Symfony\\Component\Console\\Output\\Output::isQuiet`, + :method:`Symfony\\Component\Console\\Output\\Output::isVerbose`, + :method:`Symfony\\Component\Console\\Output\\Output::isVeryVerbose` and + :method:`Symfony\\Component\Console\\Output\\Output::isDebug` + methods were introduced in version 2.4 + +.. code-block:: php + + if ($output->isQuiet()) { + // ... + } + + if ($output->isVerbose()) { + // ... + } + + if ($output->isVeryVerbose()) { + // ... + } + + if ($output->isDebug()) { + // ... + } + When the quiet level is used, all output is suppressed as the default :method:`Symfony\Component\Console\Output::write ` method returns without actually printing.