PluginProbe
WP Directory Kit / 1.3.4
WP Directory Kit v1.3.4
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / vendor / Winter_MVC / core / input.php

input.php in WP Directory Kit 1.3.4, at vendor/Winter_MVC/core/input.php

67 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * MVC_Input
5 *
6 * @version 1.0
7 *
8 * @author Sandi Winter
9 * @link https://github.com/sandiwinter/winter_mvc
10 */
11 if ( ! class_exists( 'MVC_Input' ) ):
12
13 class MVC_Input {
14
15 public function __construct()
16 {
17 }
18
19 public function post($name = NULL)
20 {
21 if($name === NULL)
22 return wmvc_xss_clean_array(wmvc_stripslashes_deep($_POST));
23
24 if(isset($_POST[$name]))
25 {
26 return wmvc_xss_clean(wmvc_stripslashes_deep($_POST[$name]));
27 }
28
29 return NULL;
30 }
31
32 public function get($name = NULL)
33 {
34 if($name === NULL)
35 return wmvc_xss_clean_array($_GET);
36
37 if(isset($_GET[$name]))
38 {
39 return wmvc_xss_clean($_GET[$name]);
40 }
41
42 return NULL;
43 }
44
45 public function post_get($name = NULL)
46 {
47 if($name === NULL)
48 return array_merge($_POST, $_GET);
49
50 if(isset($_POST[$name]))
51 {
52 return wmvc_xss_clean($_POST[$name]);
53 }
54
55 if(isset($_GET[$name]))
56 {
57 return wmvc_xss_clean($_GET[$name]);
58 }
59
60 return NULL;
61 }
62
63 }
64
65 endif;
66
67 ?>