Webmozart\Console\Api\IO\Output::mayWrite PHP Méthode

mayWrite() protected méthode

Returns whether an output may be written for the given flags.
protected mayWrite ( integer $flags ) : boolean
$flags integer The flags.
Résultat boolean Returns `true` if the output may be written and `false` otherwise.
    protected function mayWrite($flags)
    {
        if ($this->quiet) {
            return false;
        }
        if ($flags & IO::VERBOSE) {
            return $this->verbosity >= IO::VERBOSE;
        }
        if ($flags & IO::VERY_VERBOSE) {
            return $this->verbosity >= IO::VERY_VERBOSE;
        }
        if ($flags & IO::DEBUG) {
            return $this->verbosity >= IO::DEBUG;
        }
        return true;
    }