You are here

protected function AcquiaConnectorMiddleware::updateRequestCount in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 tests/modules/src/AcquiaConnectorMiddleware.php \Drupal\acquia_connector_test\AcquiaConnectorMiddleware::updateRequestCount()
  2. 3.x tests/modules/src/AcquiaConnectorMiddleware.php \Drupal\acquia_connector_test\AcquiaConnectorMiddleware::updateRequestCount()

Update request count.

1 call to AcquiaConnectorMiddleware::updateRequestCount()
AcquiaConnectorMiddleware::createPromise in tests/modules/src/AcquiaConnectorMiddleware.php
Creates a promise for the NSPI request.

File

tests/modules/src/AcquiaConnectorMiddleware.php, line 85

Class

AcquiaConnectorMiddleware
Guzzle middleware for the Acquia Connector API.

Namespace

Drupal\acquia_connector_test

Code

protected function updateRequestCount() {
  $requests = \Drupal::state()
    ->get('acquia_connector_test_request_count', 0);
  $requests++;
  \Drupal::state()
    ->set('acquia_connector_test_request_count', $requests);
}