CoreFiles by mySites.guru
BufferedOutput.php40 lines, 802 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
dec53c4006464c638afe7f8b7562b7ce
sha1
7d99838b92ee8f3bf5dc3eeaec469cd3fc7327eb
sha256
fcab6c5d3a1edcd67ddbb5c701799610b34c3ce023ffa0f00e0e72b9d3fe8d07
<?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)
    {
        $this->buffer .= $message;

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

No other release has this exact content. See every version of this file.