Magic method convert the instance body into a string.

@return string
329092
public function toString()
    {
        $headers = $this->headers();
        if ($headers['Transfer-Encoding']->value() === 'chunked') {
            return $this->toChunks();
        }
        return $this->_stream->toString();
    }
413863
public function toString()
        {
            if ($this->void) {
                return '<'.$this->tag.$this->createAttributes().' />';
            } else {
                return '<'.$this->tag.$this->createAttributes().'>'.$this->recursivelyStringify($this->content).'</'.$this->tag.'>';
            }
        }
1098973
public function toString()
    {
        if (count($children = $this->getChildren()) > 0 && '' != $this->getBody()) {
            $this->setChildren(array_merge([$this->becomeMimePart()], $children));
            $string = parent::toString();
            $this->setChildren($children);
        } else {
            $string = parent::toString();
        }

        return $string;
    }
966414
public function encode()
    {
    	foreach ($this->body as $key => $value) {
    		$result[] = $this->replaceText($value);
    	}

    	return implode('', $result);
    }
546377
public function toString(): string
    {
        $message = "the element [{$this->selector}]";

        if (! empty($this->attributes)) {
            $message .= ' with the attributes '.json_encode($this->attributes);
        }

        return $message;
    }
224089
public function toString()
    {
        if ($this->isEmpty()) {
            return '';
        }

        $tabulationFormatted = $this->getTabulationFormatted();

        $string = '{' . PHP_EOL;
        $string .= $this->toStringMethods();
        $string .= $tabulationFormatted . '}';
        return $string . PHP_EOL;
    }
541727
public function getBodyAsString(): string
    {
        $body = $this->getBody();
        if (is_string($body)) {
            return $body;
        }
        if (null === $body) {
            return '';
        }
        if (is_callable($body)) {
            ob_start();
            $body();

            return ob_get_clean();
        }
        /**
         * @var string|int|null
         */
        $contentLength = $this->getHeader('Content-Length');
        if (is_int($contentLength) || ctype_digit($contentLength)) {
            return stream_get_contents($body, (int) $contentLength);
        }

        return stream_get_contents($body);
    }
1126627
public function generateBody()
    {
        if (count($this->body) === 0) {
            return '{' . $this->getLineFeed() . $this->getIndentation() . '}';
        } else {
            $code = array();
            $code[] = '{';
            foreach ($this->body as $line) {
                $line->addIndentationLevel($this->getIndentationLevel() + 1);
                $line->setIndentationString($this->getIndentationString());
                $code[] = rtrim($line->generate());
            }

            $code[] = $this->getIndentation() . '}';

            return implode($this->getLineFeed(), $code);
        }
    }
1250891
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;
    }
1111062
public function toString()
    {
        $string = '';
        $methods = $this->getIterator();
        foreach ($methods as $method) {
            $string .= $method->toString();
        }

        return $string;
    }
568106
public function getRawBody(): string
    {
        if ($this->_rawBody === null) {
            $this->_rawBody = \file_get_contents('php://input');
        }

        return $this->_rawBody;
    }
1252807
public function toString() {
		$output = $this->getStatusLine() . "\r\n";
		foreach ($this->getHeaders() as $header) {
			$output .= $header . "\r\n";
		}
		$output .= "\r\n";
		$output .= $this->getBody();
		return $output;
	}
1204121
public function toString() {
        $documentation = preg_replace_callback(
            '@\r?\n@',
            function ($matches) {
                return $matches[0] . '	 * ';
            },
            trim($this->getDescription())
        );
        if($documentation == '') {
            $documentation = $this->getName();
        }
        $buffer = '
	/**
	 * ' . $documentation . '
';
        foreach($this->getParameters() as $parameter) {
            $buffer .= $parameter->toDocTypeString($this);
        }
        if($this->getName() != '__construct') {
            $buffer .= '	 * @return ' . $this->getReturnType() . '
';
        }
        foreach($this->getThrows() as $throw) {
            $buffer .= '	 * @throws ' . $throw . '
';
        }
        $buffer .= '	 */
	' . ($this->isFinal() ? 'final ' : '') . $this->getAccess() . ' ' . ($this->isStatic() ? 'static ' : '') . 'function ' . $this->getName() . '(';
        foreach($this->getParameters() as $key => $parameter) {
            if($key != 0) {
                $buffer .= ', ';
            }
            if($parameter->isStrictType()) {
                if(!is_null($parameter->getStrictClass())) {
                    $buffer .= $parameter->getStrictClass() . ' ';
                } else {
                    $buffer .= $parameter->getType() . ' ';
                }
            }
            $buffer .= '$' . $parameter->getName();
            if(!is_null($parameter->getDefaultValue())) {
                $buffer .= '=' . $parameter->getDefaultValue();
            }
        }
        $buffer .= ') {
		' . trim($this->getContent()) . '
	}
';
        return $buffer;
    }
998555
public function getPostBody()
    {
        $output = '';
        if ($this->isJson) {
            $jsonPretty = ($this->isJsonPretty ? JSON_PRETTY_PRINT : NULL);
            if (count($this->data) > 0) {
                $output = json_encode($this->data, $jsonPretty);
            }
        } elseif ($this->isXML) {
            $output = $this->data;
        } elseif (count($this->data) > 0) {
            $output = http_build_query($this->data);
        }

        return $output;
    }
105050
public function toString()
	{
		$this->_generateBaseString();
		$this->_addName();
		$this->_addType();
		$this->_addRestriction();
		$this->_addDefault();

		return $this->_asString;
	}
637238
public function toString() {
        $str = $this->protocol . '://' . $this->hostName;
        if ($this->protocol==='http' && $this->portNumber==80) {
            //don't add port
        } else if ($this->protocol==='https' && $this->portNumber==443) {
            //don't add port
        } else {
            $str .= ':'. $this->portNumber;
        }
        return $str;
    }
1325708
public function toString()
    {
        $result = '';
        foreach ($this->getChunkCursor() as $chunk) {
            $result .= $chunk['data']->getData();
        }
        return $result;
    }