0 follower

Final Class Yiisoft\Yii\Console\Output\ConsoleBufferedOutput

InheritanceYiisoft\Yii\Console\Output\ConsoleBufferedOutput » Symfony\Component\Console\Output\ConsoleOutput

Public Methods

Hide inherited methods

Method Description Defined By
fetch() Returns buffer content optionally clearing it. Yiisoft\Yii\Console\Output\ConsoleBufferedOutput

Method Details

Hide inherited methods

doWrite() protected method

protected void doWrite ( string $message, boolean $newline )
$message string
$newline boolean

                protected function doWrite(string $message, bool $newline): void
{
    $this->buffer .= $message;
    if ($newline) {
        $this->buffer .= PHP_EOL;
    }
    parent::doWrite($message, $newline);
}

            
fetch() public method

Returns buffer content optionally clearing it.

public string fetch ( boolean $clearBuffer false )
$clearBuffer boolean

                public function fetch(bool $clearBuffer = false): string
{
    $content = $this->buffer;
    if ($clearBuffer) {
        $this->buffer = '';
    }
    return $content;
}