Hi, not exactly sure what exactly the issue is but that's just an example that loosely states that:
If you access "/example" normally (not with ajax/xhr) then the getFull method of the Page class will get loaded. (this could, for example, show the entire example page, with headers, footers, etc)
If you access "/example" with ajax/xhr then the get getFragment method of the Page class will get loaded. (this could, for example, just show the main content and exclude any headers, footers, etc).
So, that same url can redirect to different methods depending if it's a sync or ajax request.
An alternative way to do the same thing with a single route/method would be something like:
$f3->route('GET /example','Page->getPage');
class Page
{
public function getPage($f3)
{
if($f3->get('AJAX') {
// show the page when requested with ajax
} else {
// show the full page when requested normally
}
}
}
Hope it helps.