From 89177306a2278255d6a2203b5fff4a839183d3cd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 14:00:49 +0200 Subject: 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. --- inc/load.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/load.php') 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', -- cgit v1.2.3