1 | <?php |
||
16 | class admin_input |
||
17 | { |
||
18 | const MAX_NAME_LENGTH = 255; |
||
19 | const DATE_FORMAT = 'Y-m-d'; |
||
20 | const DEFAULT_PRIORITY = 5; |
||
21 | |||
22 | /** @var \phpbb\user */ |
||
23 | protected $user; |
||
24 | |||
25 | /** @var \phpbb\language\language */ |
||
26 | protected $language; |
||
27 | |||
28 | /** @var \phpbb\request\request */ |
||
29 | protected $request; |
||
30 | |||
31 | /** @var \phpbb\ads\banner\banner */ |
||
32 | protected $banner; |
||
33 | |||
34 | /** @var array Form validation errors */ |
||
35 | protected $errors = array(); |
||
36 | |||
37 | /** |
||
38 | * Constructor |
||
39 | * |
||
40 | * @param \phpbb\user $user User object |
||
41 | * @param \phpbb\language\language $language Language object |
||
42 | * @param \phpbb\request\request $request Request object |
||
43 | * @param \phpbb\ads\banner\banner $banner Banner upload object |
||
44 | */ |
||
45 | 19 | public function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\ads\banner\banner $banner) |
|
54 | |||
55 | /** |
||
56 | * Gets all errors |
||
57 | * |
||
58 | * @return array Errors |
||
59 | */ |
||
60 | 14 | public function get_errors() |
|
64 | |||
65 | /** |
||
66 | * Returns number of errors. |
||
67 | * |
||
68 | * @return int Number of errors |
||
69 | */ |
||
70 | 14 | public function has_errors() |
|
74 | |||
75 | /** |
||
76 | * Get admin form data. |
||
77 | * |
||
78 | * @return array Form data |
||
79 | */ |
||
80 | 12 | public function get_form_data() |
|
119 | |||
120 | /** |
||
121 | * Upload image and return updated ad code or <img> of new banner when using ajax. |
||
122 | * |
||
123 | * @param string $ad_code Current ad code |
||
124 | * @return string \phpbb\json_response when request is ajax or updated ad code otherwise. |
||
125 | */ |
||
126 | 7 | public function banner_upload($ad_code) |
|
156 | |||
157 | /** |
||
158 | * Validate advertisement name |
||
159 | * |
||
160 | * @param string $ad_name Advertisement name |
||
161 | */ |
||
162 | 12 | protected function validate_ad_name($ad_name) |
|
173 | |||
174 | /** |
||
175 | * Validate advertisement end date |
||
176 | * |
||
177 | * @param string $end_date Advertisement end date |
||
178 | */ |
||
179 | 12 | protected function validate_ad_end_date($end_date) |
|
195 | |||
196 | /** |
||
197 | * Validate advertisement priority |
||
198 | * |
||
199 | * @param int $ad_priority Advertisement priority |
||
200 | */ |
||
201 | 12 | protected function validate_ad_priority($ad_priority) |
|
208 | |||
209 | /** |
||
210 | * Validate advertisement views limit |
||
211 | * |
||
212 | * @param int $ad_views_limit Advertisement views limit |
||
213 | */ |
||
214 | 12 | protected function validate_ad_views_limit($ad_views_limit) |
|
221 | |||
222 | /** |
||
223 | * Validate advertisement clicks limit |
||
224 | * |
||
225 | * @param int $ad_clicks_limit Advertisement clicks limit |
||
226 | */ |
||
227 | 12 | protected function validate_ad_clicks_limit($ad_clicks_limit) |
|
234 | |||
235 | /** |
||
236 | * Validate advertisement owner |
||
237 | * |
||
238 | * @param string $ad_owner Advertisement owner |
||
239 | */ |
||
240 | 12 | protected function validate_ad_owner($ad_owner) |
|
248 | |||
249 | /** |
||
250 | * Convert format of end date from string to unix timestamp |
||
251 | * |
||
252 | * @param string $end_date Advertisement end date in YYYY-MM-DD format |
||
253 | * @return int Advertisement end date in unix timestamp |
||
254 | */ |
||
255 | 12 | protected function end_date_to_timestamp($end_date) |
|
259 | |||
260 | /** |
||
261 | * Convert advertisement owner username to ID |
||
262 | * |
||
263 | * @param string $ad_owner Advertisement owner username |
||
264 | * @return int Advertisement owner ID |
||
265 | */ |
||
266 | 10 | protected function owner_to_id($ad_owner) |
|
276 | |||
277 | /** |
||
278 | * Send ajax response |
||
279 | * |
||
280 | * @param bool $success Is request successful? |
||
281 | * @param string $text Text to return |
||
282 | */ |
||
283 | 2 | protected function send_ajax_response($success, $text) |
|
292 | } |
||
293 |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.