/** * @inheritdoc */ public function getCookies() { $cookieCollection = parent::getCookies(); if ($cookieCollection->getCount() === 0 && $this->getHeaders()->has('set-cookie')) { $cookieStrings = $this->getHeaders()->get('set-cookie', [], false); foreach ($cookieStrings as $cookieString) { $cookieCollection->add($this->parseCookie($cookieString)); } } return $cookieCollection; }
/** * @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; }
/** * @inheritdoc */ public function toString() { $result = strtoupper($this->getMethod()) . ' ' . $this->getUrl(); $parentResult = parent::toString(); if ($parentResult !== '') { $result .= "\n" . $parentResult; } return $result; }