diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-06-24 14:00:49 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-06-24 14:00:49 +0200 |
commit | 89177306a2278255d6a2203b5fff4a839183d3cd (patch) | |
tree | 01117ed85283fd12a25809a6f3d9e360b4c860f1 /inc/load.php | |
parent | 3791b5891b0644625c7b05b63fc27fc5086a0f2c (diff) | |
download | rpg-89177306a2278255d6a2203b5fff4a839183d3cd.tar.gz rpg-89177306a2278255d6a2203b5fff4a839183d3cd.tar.bz2 |
Introducing a $_REQUEST/POST/GET wrapper
This new wrapper ensures types are correct and accessed parameters are
actually set (with custom default fallbacks).
The wrapper is available in the global $INPUT variable. It accesses
$_REQUEST by default. If POST or GET is required, the post and get
members can be used:
$INPUT->int('foo',false); // access $_REQUEST['foo'], default false
$INPUT->post->int('foo'); // access $_POST['foo'], default 0
$INPUT->get->int('foo'); // access $_GET['foo'], default 0
The codebase still needs to be updated to make use of this.
Diffstat (limited to 'inc/load.php')
-rw-r--r-- | inc/load.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/inc/load.php b/inc/load.php index 7a410e452..b676518e7 100644 --- a/inc/load.php +++ b/inc/load.php @@ -62,6 +62,7 @@ function load_autoload($name){ 'Doku_Event' => DOKU_INC.'inc/events.php', 'Doku_Event_Handler' => DOKU_INC.'inc/events.php', 'EmailAddressValidator' => DOKU_INC.'inc/EmailAddressValidator.php', + 'Input' => DOKU_INC.'inc/Input.class.php', 'JpegMeta' => DOKU_INC.'inc/JpegMeta.php', 'SimplePie' => DOKU_INC.'inc/SimplePie.php', 'FeedParser' => DOKU_INC.'inc/FeedParser.php', |