Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
request.php
1<?php
2
4
5class Request
6{
7 public $method;
8 public $uri;
9 public $headers = [];
10 public $body;
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->method = $fields['method'] ?? $this->method;
23 $this->uri = $fields['uri'] ?? $this->uri;
24 $this->headers = $fields['headers'] ?? $this->headers;
25 $this->body = $fields['body'] ?? $this->body;
26 }
27}
__construct(array $fields=null)
Definition request.php:12