Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

  • HistoryPlugin
  • Overview
  • Namespace
  • Class
  • Tree

Class HistoryPlugin

Maintains a list of requests and responses sent using a request or client

Guzzle\Plugin\History\HistoryPlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface, IteratorAggregate, Countable
Namespace: Guzzle\Plugin\History
Located at src/Guzzle/Plugin/History/HistoryPlugin.php
Methods summary
public static
# getSubscribedEvents( )
public string
# __toString( )

Convert to a string that contains all request and response headers

Convert to a string that contains all request and response headers

Returns

string
public Guzzle\Plugin\History\HistoryPlugin
# add( Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response = null )

Add a request to the history

Add a request to the history

Parameters

$request
Request to add
$response
Response of the request

Returns

Guzzle\Plugin\History\HistoryPlugin
public Guzzle\Plugin\History\HistoryPlugin
# setLimit( integer $limit )

Set the max number of requests to store

Set the max number of requests to store

Parameters

$limit
Limit

Returns

Guzzle\Plugin\History\HistoryPlugin
public integer
# getLimit( )

Get the request limit

Get the request limit

Returns

integer
public array
# getAll( )

Get all of the raw transactions in the form of an array of associative arrays containing 'request' and 'response' keys.

Get all of the raw transactions in the form of an array of associative arrays containing 'request' and 'response' keys.

Returns

array
public ArrayIterator
# getIterator( )

Get the requests in the history

Get the requests in the history

Returns

ArrayIterator

Implementation of

IteratorAggregate::getIterator()
public integer
# count( )

Get the number of requests in the history

Get the number of requests in the history

Returns

integer

Implementation of

Countable::count()
public Guzzle\Http\Message\RequestInterface
# getLastRequest( )

Get the last request sent

Get the last request sent

Returns

Guzzle\Http\Message\RequestInterface
public Guzzle\Http\Message\Response|null
# getLastResponse( )

Get the last response in the history

Get the last response in the history

Returns

Guzzle\Http\Message\Response|null
public Guzzle\Plugin\History\HistoryPlugin
# clear( )

Clears the history

Clears the history

Returns

Guzzle\Plugin\History\HistoryPlugin
public
# onRequestSent( Guzzle\Common\Event $event )
Properties summary
protected integer $limit

The maximum number of requests to maintain in the history

The maximum number of requests to maintain in the history

# 10
protected array $transactions

Requests and responses that have passed through the plugin

Requests and responses that have passed through the plugin

# array()
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen