Write a source line.

@param string $line
551890
private function writeLine($line)
    {
        $this->text .= str_repeat(' ', $this->indent * 4);
        $this->text .= $line;
        $this->text .= PHP_EOL;
    }
908519
private function findPath(string $line)
    {
        $matches = [];
        if (preg_match('/^diff --git SRC\/(.*) DST\/(.*)$/', $line, $matches)) {
            $this->originalPath = $matches[1];
            $this->destinationPath = $matches[2];
        }
    }
671872
protected function blockInclude($line)
    {
        if ($this->config["include"]
            && preg_match("/^#include[ \t]([\w.]+)$/", $line, $matches)
        ) {
            $file = $this->config["include_base"]."/".$matches[1];

            if (!is_readable($file)) {
                throw new Exception("Could not find include file: '$file'");
            }

            $include = file_get_contents($file);
            $include = str_replace(array("\r\n", "\r"), "\n", $include);
            $include = explode("\n", $include);
            array_splice(
                $this->lines,
                $this->lineNumber - 1,
                1,
                $include
            );

            $this->lineNumber--;
            return true;
        }
    }
70586
public function write($str, $new_line = true)
    {
        fwrite($this->stream, $str.( true===$new_line ? PHP_EOL : '' ));
        fflush($this->stream);
    }
329308
public function addErrorOutput($line)
    {
        $this->lastOutputTime = microtime(true);

        fseek($this->stderr, 0, SEEK_END);
        fwrite($this->stderr, $line);
        fseek($this->stderr, $this->incrementalErrorOutputOffset);
    }
1201876
protected function processLine($line)
    {
        if ($line === '') {
            $this->handleBlankLine();
            return;
        }

        $this->justNewEntry = false;

        $data = $this->parseLine($line);

        if ($data['key'][0] === '#') {
            $this->handleComment($data);
            return;
        }

        $this->handleOtherCases($data, $line);
    }
1359497
public function add($line)
    {
        $uriParser = new UriParser($line);
        $uri = $uriParser->encode();
        if (!$uriParser->validate() ||
            in_array($uri, $this->sitemaps)
        ) {
            return false;
        }
        $this->sitemaps[] = $uri;
        return true;
    }
1234945
protected function isComment($line)
    {
        if (is_string($line) && (substr($line, 0, 1) == ';' || trim($line) == '')) {
            return true;
        }

        return false;
    }
842342
public function add($line)
    {
        if (!empty($this->version)) {
            return false;
        }
        $this->version = $line;
        return true;
    }
788371
public function clearLines(int $lines): void
	{
		if($this->environment->hasAnsiSupport())
		{
			for($i = 0; $i < $lines; $i++)
			{
				if($i > 0)
				{
					$this->write("\033[F");
				}

				$this->clearLine();
			}
		}
	}
565096
public function addLine(Line $line)
    {
        $this->lines[] = $line;
        $this->end = $line->getIndex();
    }
72322
protected function handleMessage($line)
    {
        $pos = strpos($line, ' ');
        if ($pos === false) {
            return;
        }

        $pattern    = preg_quote(substr($line, 0, $pos), '@');
        $pattern    = strtr($pattern, array('\\?' => '.?', '\\*' => '.*'));
        $line       = substr($line, $pos + 1);
        if ($line === false) {
            return;
        }

        foreach ($this->bot->getConnections() as $connection) {
            if (!($connection instanceof \Erebot\Interfaces\SendingConnection) || $connection == $this) {
                continue;
            }

            $config = $connection->getConfig(null);
            $netConfig = $config->getNetworkCfg();
            if (preg_match('@^'.$pattern.'$@Di', $netConfig->getName())) {
                $connection->getIO()->push($line);
            }
        }
    }
869427
protected function write($line)
    {
        for ($written = 0, $len = strlen($line); $written < $len; $written += $fwrite) {
            $fwrite = fwrite($this->socket, substr($line, $written));
            if ($fwrite === false) {
                throw new \Erebot\Exception('Connection closed by proxy');
            }
        }
        return $written;
    }
745303
public function write($sLine)
    {
        $sLine = $this->removeSID($sLine);
        $sLine = str_replace(["\r\n", "\n"], "", $sLine);
        fwrite($this->fpFile, $sLine . "\r\n");
    }
25749
public void addLine(int startLine, String sourceFile, int repeatCount,
                      int outputLine, int outputIncrement)
  {
    _lines.add(new Line(startLine, sourceFile, repeatCount,
                        outputLine, outputIncrement));
  }
1241022
public function writeln($lines)
    {
        if (!is_array($lines)) {
            $lines = [$lines];
        }

        foreach ($lines as $line) {
            $this->write($line);
            $this->newline();
        }
        return $this;
    }
335326
private function isChangePositionLine(string $line): bool
    {
        $matches = [];
        if (preg_match('#^@@ (\-[0-9,]{3,} \+[0-9,]{3,}) @@ ?(.*)$#', $line, $matches)) {
            $this->currentPosition                        = $matches[1];
            $this->currentChanges[$this->currentPosition] = new Change($matches[1], $matches[2]);
            return true;
        }
        return false;
    }