Open Journal Systems  3.3.0
Guzzle\Plugin\Cookie\CookiePlugin Class Reference
Inheritance diagram for Guzzle\Plugin\Cookie\CookiePlugin:
Symfony\Component\EventDispatcher\EventSubscriberInterface

Public Member Functions

 __construct (CookieJarInterface $cookieJar=null)
 
 getCookieJar ()
 
 onRequestBeforeSend (Event $event)
 
 onRequestSent (Event $event)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Protected Attributes

 $cookieJar
 

Detailed Description

Adds, extracts, and persists cookies between HTTP requests

Definition at line 13 of file CookiePlugin.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Plugin\Cookie\CookiePlugin::__construct ( CookieJarInterface  $cookieJar = null)
Parameters
CookieJarInterface$cookieJarCookie jar used to hold cookies. Creates an ArrayCookieJar by default.

Definition at line 24 of file CookiePlugin.php.

References Guzzle\Plugin\Cookie\CookiePlugin\$cookieJar.

Member Function Documentation

◆ getCookieJar()

Guzzle\Plugin\Cookie\CookiePlugin::getCookieJar ( )

Get the cookie cookieJar

Returns
CookieJarInterface

Definition at line 42 of file CookiePlugin.php.

References Guzzle\Plugin\Cookie\CookiePlugin\$cookieJar.

◆ getSubscribedEvents()

static Guzzle\Plugin\Cookie\CookiePlugin::getSubscribedEvents ( )
static

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

  • The method name to call (priority defaults to 0)
  • An array composed of the method name to call and the priority
  • An array of arrays composed of the method names to call and respective priorities, or 0 if unset

For instance:

  • array('eventName' => 'methodName')
  • array('eventName' => array('methodName', $priority))
  • array('eventName' => array(array('methodName1', $priority), array('methodName2')))
Returns
array The event names to listen to

Implements Symfony\Component\EventDispatcher\EventSubscriberInterface.

Definition at line 29 of file CookiePlugin.php.

◆ onRequestBeforeSend()

Guzzle\Plugin\Cookie\CookiePlugin::onRequestBeforeSend ( Event  $event)

Add cookies before a request is sent

Parameters
Event$event

Definition at line 52 of file CookiePlugin.php.

◆ onRequestSent()

Guzzle\Plugin\Cookie\CookiePlugin::onRequestSent ( Event  $event)

Extract cookies from a sent request

Parameters
Event$event

Definition at line 69 of file CookiePlugin.php.

Field Documentation

◆ $cookieJar

CookieJarInterface Guzzle\Plugin\Cookie\CookiePlugin::$cookieJar
protected

Cookie cookieJar used to hold cookies

Definition at line 19 of file CookiePlugin.php.

Referenced by Guzzle\Plugin\Cookie\CookiePlugin\__construct(), and Guzzle\Plugin\Cookie\CookiePlugin\getCookieJar().


The documentation for this class was generated from the following file: