SimplePie_HTTP_Parser::new_line PHP Метод

new_line() публичный Метод

Deal with a new line, shifting data around as needed
public new_line ( )
    function new_line()
    {
        $this->value = trim($this->value, "\r ");
        if ($this->name !== '' && $this->value !== '') {
            $this->name = strtolower($this->name);
            if (isset($this->headers[$this->name])) {
                $this->headers[$this->name] .= ', ' . $this->value;
            } else {
                $this->headers[$this->name] = $this->value;
            }
        }
        $this->name = '';
        $this->value = '';
        if (substr($this->data[$this->position], 0, 2) === "\r\n") {
            $this->position += 2;
            $this->state = 'body';
        } elseif ($this->data[$this->position] === "\n") {
            $this->position++;
            $this->state = 'body';
        } else {
            $this->state = 'name';
        }
    }