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

Public Member Functions

 __construct ($contentMd5Param='ContentMD5', $validateMd5Param='ValidateMD5')
 
 onCommandBeforeSend (Event $event)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Protected Attributes

 $contentMd5Param
 
 $validateMd5Param
 

Detailed Description

Listener used to add a ContentMD5 header to the body of a command and adds ContentMD5 validation if the ValidateMD5 option is not set to false on a command

Definition at line 13 of file CommandContentMd5Plugin.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Plugin\Md5\CommandContentMd5Plugin::__construct (   $contentMd5Param = 'ContentMD5',
  $validateMd5Param = 'ValidateMD5' 
)
Parameters
string$contentMd5ParamParameter used to check if the ContentMD5 value is being added
string$validateMd5ParamParameter used to check if validation should occur on the response

Definition at line 31 of file CommandContentMd5Plugin.php.

References Guzzle\Plugin\Md5\CommandContentMd5Plugin\$contentMd5Param, and Guzzle\Plugin\Md5\CommandContentMd5Plugin\$validateMd5Param.

Member Function Documentation

◆ getSubscribedEvents()

static Guzzle\Plugin\Md5\CommandContentMd5Plugin::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 37 of file CommandContentMd5Plugin.php.

Referenced by Guzzle\Tests\Plugin\Md5\CommandContentMd5PluginTest\testHasEvents().

◆ onCommandBeforeSend()

Guzzle\Plugin\Md5\CommandContentMd5Plugin::onCommandBeforeSend ( Event  $event)

Field Documentation

◆ $contentMd5Param

string Guzzle\Plugin\Md5\CommandContentMd5Plugin::$contentMd5Param
protected

Parameter used to check if the ContentMD5 value is being added

Definition at line 19 of file CommandContentMd5Plugin.php.

Referenced by Guzzle\Plugin\Md5\CommandContentMd5Plugin\__construct().

◆ $validateMd5Param

string Guzzle\Plugin\Md5\CommandContentMd5Plugin::$validateMd5Param
protected

Parameter used to check if validation should occur on the response

Definition at line 25 of file CommandContentMd5Plugin.php.

Referenced by Guzzle\Plugin\Md5\CommandContentMd5Plugin\__construct().


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