/** * Logout method */ public function logout() { try { $this->curl->exec($this->routes->getLogoutUrl()); $this->cookieStorage->deleteCurlCookieFile(); } catch (\Exception $e) { throw new AlmAuthenticationException('Authentication error : ' . $e->getMessage()); } return $this; }
/** * @return $this * @throws AlmCurlException */ public function createCookie() { $this->curlInit(); if ($this->curl !== null) { curl_setopt($this->curl, CURLOPT_COOKIEJAR, $this->cookieStorage->createCurlCookieFile()->getCurlCookieFile()); } else { throw new AlmCurlException('Curl not initialized'); } return $this; }