コード例 #1
0
if (!defined('APP_TOPDIR')) {
    throw new Exception('APP_TOPDIR not defined');
}
// ========================================================================
//
// Supported services
//
// ------------------------------------------------------------------------
// work out what page was requested
$oRequest = new App_Request();
// create an object to track our response
$oResponse = new App_Response();
// work out who has requested the page
$oUser = App_User::newUser($oRequest, App_Request::$userDB);
// work out what the controller class is
$oController = App_Controller::newController($oRequest, $oResponse, $oUser);
// work out how the page should be displayed
// unlike website apps, this app uses themes to determine what
// format the result should be returned as
$oTheme = App_Theme::newTheme($oRequest, $oUser);
// at this point ...
//
// $oRequest
//      contains all the information about what the user wants to do
//
// $oResponse
//      contains all the object to hold the data we will return
//
// $oController
//      contains the controller object
//