コード例 #1
0
ファイル: Header.php プロジェクト: dgame/php-http-client
 /**
  * Header constructor.
  *
  * @param HttpClient $client
  * @param string     $response
  */
 public function __construct(HttpClient $client, string $response)
 {
     if ($client->isEnabled(CURLOPT_HEADER)) {
         $this->size = (int) $client->getInfo(CURLINFO_HEADER_SIZE);
         $this->extractHeader($response);
     }
 }
コード例 #2
0
ファイル: Status.php プロジェクト: dgame/php-http-client
 /**
  * Status constructor.
  *
  * @param HttpClient $client
  */
 public function __construct(HttpClient $client)
 {
     $this->info = $client->getInfo();
 }