1 | <?php |
||
17 | class Request implements RequestInterface |
||
18 | { |
||
19 | use ConfigurableTrait; |
||
20 | |||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | protected $useOperatorUnits = true; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $method; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $service; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $language = self::LANGUAGE_RU; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $params = []; |
||
45 | |||
46 | /** |
||
47 | * Custom headers |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $headers = []; |
||
51 | |||
52 | /** |
||
53 | * @var CredentialsInterface |
||
54 | */ |
||
55 | protected $credentials; |
||
56 | |||
57 | /** |
||
58 | * @inheritdoc |
||
59 | */ |
||
60 | public static function fromArray(array $requestAttributes) |
||
66 | |||
67 | /** |
||
68 | * Request constructor. |
||
69 | * @param array $requestAttributes |
||
70 | */ |
||
71 | 2 | public function __construct(array $requestAttributes = []) |
|
75 | |||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | 1 | public function getService() |
|
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | 1 | public function getMethod() |
|
91 | |||
92 | /** |
||
93 | * @return array |
||
94 | */ |
||
95 | 1 | public function getParams() |
|
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | 1 | public function getUseOperatorUnits() |
|
107 | |||
108 | /** |
||
109 | * @param bool $useOperatorUnits |
||
110 | * @throws InvalidArgumentException |
||
111 | */ |
||
112 | 1 | public function setUseOperatorUnits($useOperatorUnits) |
|
113 | { |
||
114 | 1 | $this->useOperatorUnits = $useOperatorUnits; |
|
115 | 1 | } |
|
116 | |||
117 | /** |
||
118 | * @inheritdoc |
||
119 | */ |
||
120 | 1 | public function getCredentials() |
|
124 | |||
125 | /** |
||
126 | * @inheritdoc |
||
127 | */ |
||
128 | 1 | public function getLanguage() |
|
132 | } |
||
133 |