Class Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin

InheritanceGuzzle\Plugin\ErrorResponse\ErrorResponsePlugin
ImplementsSymfony\Component\EventDispatcher\EventSubscriberInterface

Converts generic Guzzle response exceptions into errorResponse exceptions

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getSubscribedEvents() Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin
onCommandBeforeSend() Adds a listener to requests before they sent from a command Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin

Method Details

getErrorClosure() protected method

protected Closure getErrorClosure ( Guzzle\Http\Message\RequestInterface $request, Guzzle\Service\Command\CommandInterface $command, Guzzle\Service\Description\Operation $operation )
$request Guzzle\Http\Message\RequestInterface

Request that received an error

$command Guzzle\Service\Command\CommandInterface

Command that created the request

$operation Guzzle\Service\Description\Operation

Operation that defines the request and errors

return Closure

Returns a closure

throws Guzzle\Plugin\ErrorResponse\Exception\ErrorResponseException
getSubscribedEvents() public static method

public static void getSubscribedEvents ( )
onCommandBeforeSend() public method

Adds a listener to requests before they sent from a command

public void onCommandBeforeSend ( Guzzle\Common\Event $event )
$event Guzzle\Common\Event

Event emitted