You are here

public function CookieJar::toArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php \GuzzleHttp\Cookie\CookieJar::toArray()

Converts the cookie jar to an array.

Return value

array

Overrides CookieJarInterface::toArray

File

vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php, line 101

Class

CookieJar
Cookie jar that stores cookies an an array

Namespace

GuzzleHttp\Cookie

Code

public function toArray() {
  return array_map(function (SetCookie $cookie) {
    return $cookie
      ->toArray();
  }, $this
    ->getIterator()
    ->getArrayCopy());
}