CoreFiles by mySites.guru
BufferedOutput.php45 lines, 853 bytes, from Joomla_4.0.0-beta6-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta5
md5
1f4bc4fce660108096aeaf0b67ed84b1
sha1
23b43093e5136294158aa8fef3a6fdf16384cd88
sha256
9ef6ae767993e46a142ac1a151b4bd416d7f76fba84c842e7253d5809eba0fe9
<?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 $buffer = '';

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

        return $content;
    }

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

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

The same content is in 126 releases, Joomla 4.0.0-beta6 to 4.4.14. See them all, or every version of this file.