CoreFiles by mySites.guru
BufferedOutput.php43 lines, 838 bytes, from Joomla_6.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 6.0.0-alpha2
md5
79f0706693df9d0d97a775924cf704ab
sha1
4b982dd79cbcf1db47935c6002f50acc1c49d243
sha256
3c65aea70c78f6a23189f6e1382982847d993094e494015bf691fd2dde386054
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Output;

/**
 * @author Jean-François Simon <[email protected]>
 */
class BufferedOutput extends Output
{
    private string $buffer = '';

    /**
     * Empties buffer and returns its content.
     */
    public function fetch(): string
    {
        $content = $this->buffer;
        $this->buffer = '';

        return $content;
    }

    /**
     * @return void
     */
    protected function doWrite(string $message, bool $newline)
    {
        $this->buffer .= $message;

        if ($newline) {
            $this->buffer .= \PHP_EOL;
        }
    }
}

The same content is in 107 releases, Joomla 5.0.0-alpha2 to 6.0.0-alpha3. See them all, or every version of this file.