1 | <?php |
||
15 | class HttpHelper |
||
16 | { |
||
17 | /** |
||
18 | * @var Response |
||
19 | */ |
||
20 | protected $response; |
||
21 | /** |
||
22 | * @var HTTPClient |
||
23 | */ |
||
24 | protected $httpclient; |
||
25 | /** |
||
26 | * @var \Padosoft\HTTPClient\RequestHelper |
||
27 | */ |
||
28 | protected $requestHelper; |
||
29 | |||
30 | /** |
||
31 | * HttpHelper constructor. |
||
32 | * @param HTTPClient $httpclient |
||
33 | */ |
||
34 | 3 | public function __construct(\Padosoft\HTTPClient\HTTPClient $httpclient) |
|
40 | |||
41 | /** |
||
42 | * Send HTTP Request |
||
43 | * |
||
44 | * @param $method |
||
45 | * @param $uri |
||
46 | * @param array $getParams |
||
47 | * @param array $postParams |
||
48 | * @param string $user |
||
49 | * @param string $password |
||
50 | * @param array $jsonParams |
||
51 | * @param int $requesTimeout |
||
52 | * @param bool $SSLVerify |
||
53 | * @param array $customHeaders |
||
54 | * @param string $accept |
||
55 | * @param string $protocolVersion |
||
56 | * @return Response |
||
57 | */ |
||
58 | 3 | public function sendSimpleRequest($method, $uri |
|
99 | |||
100 | |||
101 | |||
102 | /** |
||
103 | * @param $uri |
||
104 | * @param array $getParams |
||
105 | * @param array $postParams |
||
106 | * @return Response |
||
107 | */ |
||
108 | public function sendGet($uri, array $getParams=[], array $postParams=[]) |
||
113 | |||
114 | /** |
||
115 | * @param $uri |
||
116 | * @param array $getParams |
||
117 | * @param array $postParams |
||
118 | * @param $user |
||
119 | * @param $password |
||
120 | * @return Response |
||
121 | */ |
||
122 | public function sendGetWithAuth($uri, array $getParams=[], array $postParams=[], $user, $password) |
||
127 | |||
128 | /** |
||
129 | * @param $uri |
||
130 | * @param array $getParams |
||
131 | * @param array $postParams |
||
132 | * @return Response |
||
133 | */ |
||
134 | public function sendPost($uri, array $getParams=[], array $postParams=[]) |
||
139 | |||
140 | /** |
||
141 | * @param $uri |
||
142 | * @param array $getParams |
||
143 | * @param array $postParams |
||
144 | * @param $user |
||
145 | * @param $password |
||
146 | * @return Response |
||
147 | */ |
||
148 | public function sendPostWithAuth($uri, array $getParams=[], array $postParams=[], $user, $password) |
||
153 | |||
154 | /** |
||
155 | * @param $uri |
||
156 | * @param array $jsonParams |
||
157 | * @param $user |
||
158 | * @param $password |
||
159 | 3 | * @return Response |
|
160 | */ |
||
161 | 3 | public function sendPostJsonWithAuth($uri, array $jsonParams=[], $user, $password) |
|
166 | |||
167 | } |
||
168 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.