From 24bb5fefbdf93ce0969b7f56cc46c459ebb82a95 Mon Sep 17 00:00:00 2001 From: EoleDev Date: Thu, 14 Apr 2016 16:24:44 +0200 Subject: Mise a jour et nettoyage depot --- .../guzzle/src/Cookie/SessionCookieJar.php | 72 ---------------------- 1 file changed, 72 deletions(-) delete mode 100644 server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php (limited to 'server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php') diff --git a/server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php deleted file mode 100644 index 9cd5f9e..0000000 --- a/server/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ /dev/null @@ -1,72 +0,0 @@ -sessionKey = $sessionKey; - $this->storeSessionCookies = $storeSessionCookies; - $this->load(); - } - - /** - * Saves cookies to session when shutting down - */ - public function __destruct() - { - $this->save(); - } - - /** - * Save cookies to the client session - */ - public function save() - { - $json = []; - foreach ($this as $cookie) { - /** @var SetCookie $cookie */ - if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { - $json[] = $cookie->toArray(); - } - } - - $_SESSION[$this->sessionKey] = json_encode($json); - } - - /** - * Load the contents of the client session into the data array - */ - protected function load() - { - $cookieJar = isset($_SESSION[$this->sessionKey]) - ? $_SESSION[$this->sessionKey] - : null; - - $data = json_decode($cookieJar, true); - if (is_array($data)) { - foreach ($data as $cookie) { - $this->setCookie(new SetCookie($cookie)); - } - } elseif (strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); - } - } -} -- cgit v1.2.3