Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
response.php
1<?php
2
4
6{
7 public $statusCode = 0;
8 public $headers = [];
9 public $body = "";
10 public $error = "";
11
12 public function __construct(array $fields = null)
13 {
14 if ($fields !== null)
15 {
16 $this->hydrate($fields);
17 }
18 }
19
20 public function hydrate(array $fields)
21 {
22 $this->statusCode = isset($fields['statusCode']) ? (int)$fields['statusCode'] : $this->statusCode;
23 $this->headers = $fields['headers'] ?? $this->headers;
24 $this->body = $fields['body'] ?? $this->body;
25 $this->error = $fields['error'] ?? $this->error;
26 }
27}
__construct(array $fields=null)
Definition response.php:12