1 | <?php |
||
8 | abstract class AbstractEmitter implements EmitterInterface |
||
9 | { |
||
10 | /** |
||
11 | * Holds the emitter/transporter's URL. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $url; |
||
16 | |||
17 | /** |
||
18 | * Holds the emitter/transporter's debug mode. |
||
19 | * |
||
20 | * @var bool |
||
21 | */ |
||
22 | protected $debug = false; |
||
23 | |||
24 | /** |
||
25 | * Holds the query parameters. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $params = array(); |
||
30 | |||
31 | /** |
||
32 | * Sets the emitter/transporter's URL. |
||
33 | * |
||
34 | * @param string $url |
||
35 | */ |
||
36 | 64 | public function setUrl($url) |
|
40 | |||
41 | /** |
||
42 | * Sets the emitter/transporter's debug mode. |
||
43 | * |
||
44 | * @param bool $bool |
||
45 | */ |
||
46 | 108 | public function setDebug($bool = true) |
|
50 | |||
51 | /** |
||
52 | * Returns the current query parameters. |
||
53 | * |
||
54 | * @return array |
||
55 | */ |
||
56 | 76 | public function getParams() |
|
60 | |||
61 | /** |
||
62 | * Checks wether the named query parameter exists. |
||
63 | * |
||
64 | * @param string $key |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | 12 | public function hasParam($key) |
|
72 | |||
73 | /** |
||
74 | * Returns the named query parameter. |
||
75 | * |
||
76 | * @param string $key |
||
77 | * |
||
78 | * @return mixed |
||
79 | */ |
||
80 | 16 | public function getParam($key) |
|
84 | |||
85 | /** |
||
86 | * Sets a query parameter. |
||
87 | * |
||
88 | * @param string $key |
||
89 | * @param mixed $value |
||
90 | */ |
||
91 | 76 | public function setParam($key, $value) |
|
95 | |||
96 | /** |
||
97 | * Merges new query parameters. |
||
98 | * |
||
99 | * @param array $params |
||
100 | * |
||
101 | * @return array |
||
102 | */ |
||
103 | 108 | public function setParams(array $params) |
|
107 | |||
108 | /** |
||
109 | * Merges new query parameters. |
||
110 | * |
||
111 | * @param array $params |
||
112 | * |
||
113 | * @return array |
||
114 | */ |
||
115 | 108 | public function addParams(array $params) |
|
119 | |||
120 | /** |
||
121 | * @var Logger |
||
122 | */ |
||
123 | protected $error_handler = null; |
||
124 | |||
125 | 4 | public function setErrorHandler(LoggerInterface $logger) |
|
129 | |||
130 | /** |
||
131 | * Returns the. |
||
132 | */ |
||
133 | 8 | public function getErrorHandler() |
|
139 | |||
140 | /** |
||
141 | * Handle error. |
||
142 | * |
||
143 | * @param string $code |
||
144 | * @param string $msg |
||
145 | */ |
||
146 | 4 | public function handleError($code, $msg) |
|
154 | } |
||
155 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..