With the class RoxGenericPage?, the $Page object in our controllers will no longer be a global variable, but a local one, and rendering will happen inside the controller. This way we reduce dependencies on global state, and make our applications more independent.
This is a hybrid solution between the #436 RoxPageView scheme and the old MyTB scheme, and is more or less compatible with both.
$Page object in old MyTB scheme
The page object was obtained as a global object by
$Page = PVars::getObj('page');
Then the controller set attributes of that object:
$Page->teaser = 'this is the teaser';
Finally, in page.php, these global variables are inserted in the page html.
The page object is created as a local object by
$page = new RoxGenericPage();
Then the controller set attributes of that object:
$page->teaser = 'this is the teaser';
Finally, in the controller, the render() function is called on that local object.
$page->render();
For now, the $page->render() will do nothing but call the page.php template. Maybe it will do this another way later. Anyway, the applications don't have to care about how the $page object does the rendering.