File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,19 +272,29 @@ public function unsetParam($key)
272272
273273 /**
274274 * @param string $key
275- * @return int
275+ * @return int|null
276276 */
277277 public function getInt ($ key )
278278 {
279- return filter_var ($ this ->getParam ($ key ), FILTER_VALIDATE_INT );
279+ return filter_var ($ this ->getParam ($ key ), FILTER_VALIDATE_INT , FILTER_NULL_ON_FAILURE );
280280 }
281281
282282 /**
283283 * @param string $key
284- * @return bool
284+ * @return bool|null
285285 */
286286 public function getBoolean ($ key )
287287 {
288- return filter_var ($ this ->getParam ($ key ), FILTER_VALIDATE_BOOLEAN );
288+ return filter_var ($ this ->getParam ($ key ), FILTER_VALIDATE_BOOLEAN , FILTER_NULL_ON_FAILURE );
289+ }
290+
291+ /**
292+ * @param string $key
293+ * @return array|null
294+ */
295+ public function getArray ($ key )
296+ {
297+ $ param = $ this ->getParam ($ key );
298+ return $ param ? (array ) $ param : null ;
289299 }
290300}
You can’t perform that action at this time.
0 commit comments