public function Request::setEventDispatcher

Set the EventDispatcher of the request

Parameters

EventDispatcherInterface $eventDispatcher:

Return value

HasDispatcherInterface

Overrides HasDispatcherInterface::setEventDispatcher

1 call to Request::setEventDispatcher()
Request::getEventDispatcher in drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Request.php
Get the EventDispatcher of the request

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/Request.php, line 647

Class

Request
HTTP request class to send requests

Namespace

Guzzle\Http\Message

Code

public function setEventDispatcher(EventDispatcherInterface $eventDispatcher) {
  $this->eventDispatcher = $eventDispatcher;
  $this->eventDispatcher
    ->addListener('request.error', array(
    __CLASS__,
    'onRequestError',
  ), -255);
  return $this;
}