Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

AbstractRetryableEvent.php

Zuletzt modifiziert: 09.10.2024, 12:57 - Dateigröße: 1.44 KiB


01  <?php
02  namespace GuzzleHttp\Event;
03   
04  /**
05   * Abstract request event that can be retried.
06   */
07  class AbstractRetryableEvent extends AbstractTransferEvent
08  {
09      /**
10       * Mark the request as needing a retry and stop event propagation.
11       *
12       * This action allows you to retry a request without emitting the "end"
13       * event multiple times for a given request. When retried, the request
14       * emits a before event and is then sent again using the client that sent
15       * the original request.
16       *
17       * When retrying, it is important to limit the number of retries you allow
18       * to prevent infinite loops.
19       *
20       * This action can only be taken during the "complete" and "error" events.
21       *
22       * @param int $afterDelay If specified, the amount of time in milliseconds
23       *                        to delay before retrying. Note that this must
24       *                        be supported by the underlying RingPHP handler
25       *                        to work properly. Set to 0 or provide no value
26       *                        to retry immediately.
27       */
28      public function retry($afterDelay = 0)
29      {
30          // Setting the transition state to 'retry' will cause the next state
31          // transition of the transaction to retry the request.
32          $this->transaction->state = 'retry';
33   
34          if ($afterDelay) {
35              $this->transaction->request->getConfig()->set('delay', $afterDelay);
36          }
37   
38          $this->stopPropagation();
39      }
40  }
41