You are here

public function CookieJar::toArray in Lockr 7.3

Converts the cookie jar to an array.

Return value

array

Overrides CookieJarInterface::toArray

File

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

Class

CookieJar
Cookie jar that stores cookies as an array

Namespace

GuzzleHttp\Cookie

Code

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