SimplePie_HTTP_Parser::new_line() protected WP 1.0
Deal with a new line, shifting data around as needed
{} Это метод класса: SimplePie_HTTP_Parser{}
Хуков нет.
Возвращает
null
. Null. Ничего.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->new_line();
Код SimplePie_HTTP_Parser::new_line() SimplePie HTTP Parser::new line WP 5.7
protected function new_line()
{
$this->value = trim($this->value, "\x0D\x20");
if ($this->name !== '' && $this->value !== '')
{
$this->name = strtolower($this->name);
// We should only use the last Content-Type header. c.f. issue #1
if (isset($this->headers[$this->name]) && $this->name !== 'content-type')
{
$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) === "\x0D\x0A")
{
$this->position += 2;
$this->state = 'body';
}
elseif ($this->data[$this->position] === "\x0A")
{
$this->position++;
$this->state = 'body';
}
else
{
$this->state = 'name';
}
}