Open Journal Systems
3.3.0
|
Public Member Functions | |
__toString () | |
add (RequestInterface $request, Response $response=null) | |
clear () | |
count () | |
getAll () | |
getIterator () | |
getLastRequest () | |
getLastResponse () | |
getLimit () | |
onRequestSent (Event $event) | |
setLimit ($limit) | |
Static Public Member Functions | |
static | getSubscribedEvents () |
Protected Attributes | |
$limit = 10 | |
$transactions = array() | |
Maintains a list of requests and responses sent using a request or client
Definition at line 13 of file HistoryPlugin.php.
Guzzle\Plugin\History\HistoryPlugin::__toString | ( | ) |
Convert to a string that contains all request and response headers
Definition at line 37 of file HistoryPlugin.php.
Guzzle\Plugin\History\HistoryPlugin::add | ( | RequestInterface | $request, |
Response | $response = null |
||
) |
Add a request to the history
RequestInterface | $request | Request to add |
Response | $response | Response of the request |
Definition at line 56 of file HistoryPlugin.php.
References Guzzle\Plugin\History\HistoryPlugin\count(), and Guzzle\Http\Message\RequestInterface\getResponse().
Referenced by Guzzle\Tests\Plugin\History\HistoryPluginTest\addRequests(), and Guzzle\Plugin\History\HistoryPlugin\onRequestSent().
Guzzle\Plugin\History\HistoryPlugin::clear | ( | ) |
Guzzle\Plugin\History\HistoryPlugin::count | ( | ) |
Get the number of requests in the history
Definition at line 124 of file HistoryPlugin.php.
Referenced by Guzzle\Plugin\History\HistoryPlugin\add().
Guzzle\Plugin\History\HistoryPlugin::getAll | ( | ) |
Get all of the raw transactions in the form of an array of associative arrays containing 'request' and 'response' keys.
Definition at line 100 of file HistoryPlugin.php.
References Guzzle\Plugin\History\HistoryPlugin\$transactions.
Guzzle\Plugin\History\HistoryPlugin::getIterator | ( | ) |
Get the requests in the history
Definition at line 110 of file HistoryPlugin.php.
References Guzzle\Plugin\History\HistoryPlugin\$transactions.
Guzzle\Plugin\History\HistoryPlugin::getLastRequest | ( | ) |
Guzzle\Plugin\History\HistoryPlugin::getLastResponse | ( | ) |
Get the last response in the history
Definition at line 146 of file HistoryPlugin.php.
Guzzle\Plugin\History\HistoryPlugin::getLimit | ( | ) |
Get the request limit
Definition at line 89 of file HistoryPlugin.php.
References Guzzle\Plugin\History\HistoryPlugin\$limit.
|
static |
Returns an array of event names this subscriber wants to listen to.
The array keys are event names and the value can be:
For instance:
Implements Symfony\Component\EventDispatcher\EventSubscriberInterface.
Definition at line 27 of file HistoryPlugin.php.
Referenced by Guzzle\Tests\Plugin\History\HistoryPluginTest\testDescribesSubscribedEvents().
Guzzle\Plugin\History\HistoryPlugin::onRequestSent | ( | Event | $event | ) |
Definition at line 165 of file HistoryPlugin.php.
References Guzzle\Plugin\History\HistoryPlugin\add().
Guzzle\Plugin\History\HistoryPlugin::setLimit | ( | $limit | ) |
Set the max number of requests to store
int | $limit | Limit |
Definition at line 77 of file HistoryPlugin.php.
References Guzzle\Plugin\History\HistoryPlugin\$limit.
|
protected |
The maximum number of requests to maintain in the history
Definition at line 19 of file HistoryPlugin.php.
Referenced by Guzzle\Plugin\History\HistoryPlugin\getLimit(), and Guzzle\Plugin\History\HistoryPlugin\setLimit().
|
protected |
Requests and responses that have passed through the plugin
Definition at line 25 of file HistoryPlugin.php.
Referenced by Guzzle\Plugin\History\HistoryPlugin\getAll(), and Guzzle\Plugin\History\HistoryPlugin\getIterator().