1 | <?php declare(strict_types=1); |
||
15 | abstract class Configurator |
||
16 | { |
||
17 | /** |
||
18 | * @var array Options array buffer |
||
19 | */ |
||
20 | private $options = []; |
||
21 | |||
22 | /** |
||
23 | * Set file for read and write cookies |
||
24 | * |
||
25 | * @param string $cookies_file |
||
26 | * @return self |
||
27 | */ |
||
28 | public function setCookiesFile(string $cookies_file): self |
||
35 | |||
36 | /** |
||
37 | * Set request cookies |
||
38 | * |
||
39 | * @param array $cookies |
||
40 | * @return self |
||
41 | */ |
||
42 | public function setCookies(array $cookies): self |
||
53 | |||
54 | /** |
||
55 | * Set request headers |
||
56 | * |
||
57 | * @param array $headers |
||
58 | * @return self |
||
59 | */ |
||
60 | public function setHeaders(array $headers): self |
||
66 | |||
67 | /** |
||
68 | * Set proxy server |
||
69 | * If proxy server required authorization - provide proxy in format: |
||
70 | * user:[email protected]:port |
||
71 | * |
||
72 | * @param string $proxy |
||
73 | * @return self |
||
74 | */ |
||
75 | public function setProxy(string $proxy): self |
||
86 | |||
87 | /** |
||
88 | * Add cURL options |
||
89 | * |
||
90 | * @param array $options |
||
91 | * @return self |
||
92 | */ |
||
93 | protected function setOptions(array $options): self |
||
99 | |||
100 | /** |
||
101 | * Get options array |
||
102 | * |
||
103 | * @return array |
||
104 | */ |
||
105 | protected function getOptions(): array |
||
109 | } |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.