public function toString()
{
$result = '';
if ($this->hasHeaders()) {
$headers = $this->composeHeaderLines();
$result .= implode("\n", $headers);
}
$content = $this->getContent();
if ($content !== null) {
$result .= "\n\n" . $content;
}
return $result;
}
/** * @inheritdoc */ public function toString() { if (!$this->isPrepared) { $this->prepare(); } $result = strtoupper($this->getMethod()) . ' ' . $this->getFullUrl(); $parentResult = parent::toString(); if ($parentResult !== '') { $result .= "\n" . $parentResult; } return $result; }