Writes a single line of text to the output buffer.

@param string    $line   The line of text to write.

@access private
488371
function _writeln($line)
    {
        /* Add this line to our output buffer. */
        $this->_buffer[] = $line;

        /* Buffer the output until this page's headers have been sent. */
        if (!headers_sent()) {
            return;
        }

        /* If we haven't already opened the output window, do so now. */
        if (!$this->_opened && !$this->open()) {
            return;
        }

        /* Drain the buffer to the output window. */
        $this->_drainBuffer();
    }
28035
public function writeFreeFormLine($line)
	{
        if ($this->_logStatus == self::STATUS_LOG_OPEN
            && $this->_severityThreshold != self::OFF) {
            if (fwrite($this->_fileHandle, $line) === false) {
                $this->_messageQueue[] = $this->_messages['writefail'];
            }
        }
    }
837896
public function write(string $data) : void
    {
        $this->buffer .= $data;

        if (strlen($this->buffer) >= $this->size) {
            $this->flush();
        }
    }
1352773
public function write($file)
    {
        if (file_exists($file) && !is_writable($file)) {
            throw new RuntimeException("$file is not writable");
        }
        $fp = fopen($file, 'w');
        foreach ($this->lines as $line) {
            fwrite($fp, $line['data']);
        }
        fclose($fp);
    }
856083
public function replace($line, $lines, $text)
    {
        if ($lines > 0) {
            $this->delete($line, $lines);
        }
        return $this->insert($line, $text);
    }
1227575
public function printLine($line)
    {
        if (!$this->handle) {
            throw new \RuntimeException('can not write to file: invalid file handle');
        }
        fwrite($this->handle, $line . "\n");
        ++$this->lineNumber;
    }
998718
protected function line($text)
    {
        if($this->console) {
            $this->console->line($text);
        }

        if($this->logger) {
            $this->logger->line($text);
        }
    }
1352354
public function writeString($string) {

            $this->stream->writeInt(strlen($string));
            $this->stream->writeBuffer($string);

        }
884853
public function error($line, $eol = PHP_EOL)
    {
        fwrite(STDERR, $line . $eol);
        fflush(STDERR);
    }
70586
public function write($str, $new_line = true)
    {
        fwrite($this->stream, $str.( true===$new_line ? PHP_EOL : '' ));
        fflush($this->stream);
    }
1130825
private function header($text)
    {
        $this->io()->write($this->line(strlen($text)));
        $this->io()->write($this->color($text, $this->getConfig('fg-header')));
        $this->io()->write($this->line(strlen($text)));
    }
809083
public function write($text, $type = 'stdout')
    {
        if (in_array($type, ['stdout', 'stderr']) && ! empty($text)) {
            $f = fopen('php://' . $type, 'w');

            if (is_array($text)) {
                $text = json_encode($text);
            }

            fwrite($f, $text);
            fclose($f);
        }
    }
430985
private function notify($line)
    {
        $observers = $this->observers;

        foreach ($observers as $observer) {
            $this->delegate($observer, $line);
        }
    }
1159253
private function processLine(string $line): void
    {
        $iterator = new \ArrayIterator(explode(Tokens::SPACE, $line));

        if ($this->isControlEntry($iterator)) {
            $this->processControlEntry($iterator);

            return;
        }

        $resourceRecord = new ResourceRecord();

        $this->processResourceName($iterator, $resourceRecord);
        $this->processTtl($iterator, $resourceRecord);
        $this->processClass($iterator, $resourceRecord);
        $resourceRecord->setRdata($this->extractRdata($iterator));

        $this->zone->addResourceRecord($resourceRecord);
    }
788714
private function addSitemapLine(string $line): void
    {
        if ($this->bufferUrlCount >= self::LIMIT_URL) {
            $this->generateNewPart();
        }

        if (($this->bufferSize + \strlen($line) + 9) > self::LIMIT_SIZE) {
            $this->generateNewPart();
        }

        ++$this->bufferUrlCount;

        $this->bufferSize += fwrite($this->buffer, $line);
    }
43752
public static function out(string $text, $out = STDOUT)
    {
        if (!isset($output)) {
            $output = function ($text) use ($out) {
                fwrite($out, $text);
            };
        }

        $text = str_replace("\n", PHP_EOL, $text);
        $text = Ansi::tagsToColors($text);
        fwrite($out, $text);
    }
1053601
public void addLine(String line) {
        try {
            writer.append(line);
            writer.newLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }