/** * {@inheritdoc} */ public function __toString() { $parts = $this->_delegateUrl->getParts(); if ($this->_query) { $parts['query'] = $this->_query; } else { unset($parts['query']); } return puzzle_Url::buildUrl($parts); }