A Model-View-Controller read more at https://en.wikipedia.org/wiki/Model-view-controller
DVC is an Application which uses the Model-View-Controller model
The Application established some global parameters and a connection to data
The Controller interprets the request from the Web, channeling the route to the program and interpretting GTE/POST parameters
The controller will request any data, respecting the parameters it is given
[http://example.dom]/[people]/[edit]/[55]
[server]/[controller]/[sub-controller]/[parameter]
[server]/[class]/[class function]/[parameter]
and this could look like
<?php
class people extends Controller {
function edit( $id) {
if ( $id = abs( (int)$id)) { // simple check
// data
$dao = new dao\people; // dao - data access object
if ( $dto = $dao->getByID( $id)) { // data transition object
$this->data = (object)[
'person' => $dto
];
$this->load('edit'); // view
}
else {
print 'error .. not found';
}
}
else {
print 'error .. invalid';
}
}
}