PHP userland backwards compatibility layer that emulates PHP 5.5+ core functions.

⌈⌋ branch:  upgrade.php

Update of "input.php"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.


Artifact ID: d2e0561d82aee1d818f50dda492d01e950125a31
Page Name:input.php
Date: 2010-07-03 11:13:19
Original User: mario
Next 3d154b26ea31f3719c0c2f67ae03cf867d526347


input.php provides object-oriented security wrappers around:


It's located in ext/contrib/input.php, and on invokation automatically replaces the plain $_REQUEST arrays with objects.

This **enforces** accessing input and form data through filter functions:


There are various filter functions provided per default. But ultimately each application should add custom filter functions, whenever specific input strings are to be expected.

To make the transition easier, the input wrappers provide two additional access methods. Becaus reqriting $_REQUEST["var"] to $_REQUEST->int("var") is a lot of typing, it can be reduced to just adding the ->filter call, leaving angle brackets in place:

- $_REQUEST->name["var"]

Another option is the all-objectish access pattern:

- $_REQUEST->name->var

Besides the aforementioned standard method call:

- $_REQUEST->name("var")