CoreFiles by mySites.guru
BufferedOutput.php40 lines, 808 bytes, from Joomla_6.2.1-Stable-Full_Package.zip
Raw History Compare with 6.2.0
md5
8e6592c96958810841ca4aa7e170a117
sha1
6bedcee56cfbdd21cfd3ac2487f4052a922c384b
sha256
79cbd94813642583c0784c21817e41cf3899661089b88298737b07a64ba7a599
<?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;
    }

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

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

The same content is in 48 releases, Joomla 6.0.0-beta1 to 6.2.1. See them all, or every version of this file.