Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
CurlHandler.php
01 <?php
02 namespace GuzzleHttp\Handler;
03
04 use GuzzleHttp\Psr7;
05 use Psr\Http\Message\RequestInterface;
06
07 /**
08 * HTTP handler that uses cURL easy handles as a transport layer.
09 *
10 * When using the CurlHandler, custom curl options can be specified as an
11 * associative array of curl option constants mapping to values in the
12 * **curl** key of the "client" key of the request.
13 */
14 class CurlHandler
15 {
16 /** @var CurlFactoryInterface */
17 private $factory;
18
19 /**
20 * Accepts an associative array of options:
21 *
22 * - factory: Optional curl factory used to create cURL handles.
23 *
24 * @param array $options Array of options to use with the handler
25 */
26 public function __construct(array $options = [])
27 {
28 $this->factory = isset($options['handle_factory'])
29 ? $options['handle_factory']
30 : new CurlFactory(3);
31 }
32
33 public function __invoke(RequestInterface $request, array $options)
34 {
35 if (isset($options['delay'])) {
36 usleep($options['delay'] * 1000);
37 }
38
39 $easy = $this->factory->create($request, $options);
40 curl_exec($easy->handle);
41 $easy->errno = curl_errno($easy->handle);
42
43 return CurlFactory::finish($this, $easy, $this->factory);
44 }
45 }
46