NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class CookiePlugin

Adds, extracts, and persists cookies between HTTP requests

  Guzzle\Plugin\Cookie\CookiePlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface

Namespace: Guzzle\Plugin\Cookie
Located at Guzzle/Plugin/Cookie/CookiePlugin.php

## Methods summary

- `public` `__construct ( Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface $cookieJar = null )`
- `public static` `getSubscribedEvents ( )`
- `public` `getCookieJar ( )`

  Get the cookie cookieJar

- `public` `onRequestBeforeSend ( Guzzle\Common\Event $event )`

  Add cookies before a request is sent

- `public` `onRequestSent ( Guzzle\Common\Event $event )`

  Extract cookies from a sent request

## Methods detail

# `public`
`__construct( `Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface` $cookieJar = null )`

#### Parameters

$cookieJar
  ``Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface``
  $cookieJar Cookie jar used to hold cookies. Creates an ArrayCookieJar by default.

# `public static`
`getSubscribedEvents( )`
# `public `Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface``
`getCookieJar( )`

Get the cookie cookieJar

#### Returns

``Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface``
# `public`
`onRequestBeforeSend( `Guzzle\Common\Event` $event )`

Add cookies before a request is sent

#### Parameters

$event
  ``Guzzle\Common\Event``
  $event

# `public`
`onRequestSent( `Guzzle\Common\Event` $event )`

Extract cookies from a sent request

#### Parameters

$event
  ``Guzzle\Common\Event``
  $event

### Magic methods summary

## Properties summary

`protected `Guzzle\Plugin\Cookie\CookieJar\CookieJarInterface`` | $cookieJar | # Cookie cookieJar used to hold cookies