-
-
Notifications
You must be signed in to change notification settings - Fork 6
User input
Greg Bowler edited this page Jun 23, 2018
·
14 revisions
The Input repository is separately maintained at https://github.com/PhpGt/Input
By default, PHP exposes all user input in the superglobal variables $_GET
, $_POST
and $_FILES
, which are readable and writable by any code, including third party libraries.
All superglobals are protected within WebEngine, and instead user input is encapsulated within the Input object, which is available as the input
property of your application's Logic classes.
It doesn't matter what HTTP verb (GET, POST, PUT, DELETE, etc.) is used for the request as input is accessed in the same way for all verbs.
public function getUserInput() {
// Read the "telephone" parameter from the query string or post body:
$telephone = $this->input->get("telephone");
// Read the "name" parameter, supplying a default if input is empty:
$name = $this->input->get("name") ?? "Anon";
}
- Request-response lifecycle
- Running your application
- Project layout
- Application architecture
- Web servers
- URIs
- Page view
- Dynamic URIs and pages
- Headers and footers
- Page logic
- Protected globals
- User input
- Cookies
- Sessions
- DOM manipulation
- Custom HTML components
- DOM templates
- Binding data to the DOM
- Database
- Client side assets
- API Webservices
- Security
- Configuration
- Build system
- Coding styleguide