You are here

public function CookieJar::all in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/browser-kit/CookieJar.php \Symfony\Component\BrowserKit\CookieJar::all()

Returns not yet expired cookies.

Return value

Cookie[] An array of cookies

File

vendor/symfony/browser-kit/CookieJar.php, line 172

Class

CookieJar
CookieJar.

Namespace

Symfony\Component\BrowserKit

Code

public function all() {
  $this
    ->flushExpiredCookies();
  $flattenedCookies = array();
  foreach ($this->cookieJar as $path) {
    foreach ($path as $cookies) {
      foreach ($cookies as $cookie) {
        $flattenedCookies[] = $cookie;
      }
    }
  }
  return $flattenedCookies;
}