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

AbstractClient.php

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


 01  <?php
 02   
 03  namespace OAuth\Common\Http\Client;
 04   
 05  /**
 06   * Abstract HTTP client
 07   */
 08  abstract class AbstractClient implements ClientInterface
 09  {
 10      /**
 11       * @var string The user agent string passed to services
 12       */
 13      protected $userAgent;
 14   
 15      /**
 16       * @var int The maximum number of redirects
 17       */
 18      protected $maxRedirects = 5;
 19   
 20      /**
 21       * @var int The maximum timeout
 22       */
 23      protected $timeout = 15;
 24   
 25      /**
 26       * Creates instance
 27       *
 28       * @param string $userAgent The UA string the client will use
 29       */
 30      public function __construct($userAgent = 'PHPoAuthLib')
 31      {
 32          $this->userAgent = $userAgent;
 33      }
 34   
 35      /**
 36       * @param int $redirects Maximum redirects for client
 37       *
 38       * @return ClientInterface
 39       */
 40      public function setMaxRedirects($redirects)
 41      {
 42          $this->maxRedirects = $redirects;
 43   
 44          return $this;
 45      }
 46   
 47      /**
 48       * @param int $timeout Request timeout time for client in seconds
 49       *
 50       * @return ClientInterface
 51       */
 52      public function setTimeout($timeout)
 53      {
 54          $this->timeout = $timeout;
 55   
 56          return $this;
 57      }
 58   
 59      /**
 60       * @param array $headers
 61       */
 62      public function normalizeHeaders(&$headers)
 63      {
 64          // Normalize headers
 65          array_walk(
 66              $headers,
 67              function (&$val, &$key) {
 68                  $key = ucfirst(strtolower($key));
 69                  $val = ucfirst(strtolower($key)) . ': ' . $val;
 70              }
 71          );
 72      }
 73  }
 74