Request
An abstraction over super-globals to make the interface clean.
Request instance in Controller
<?php
// request to path: /home/user?action=render
class homeController{
public function index($request) {
$url = $request->url();
$context = ['url' => $url];
VIEW::init('index.html', $context);
// init function extracts the $context array
// in the scope of index.html so that we can use these variables in the html file
}
}
?>Methods supported by Request class
Methods List:
Last updated