コード例 #1
0
ファイル: handler.php プロジェクト: DomiStyle/Lightwork
/**
 * File used to handle all incoming requests
 *
 * This script will differentiate between the different request types and call the corresponding handler.
 *
 * @author Perfler Dominik <*****@*****.**>
 * @copyright 2014-2015 Perfler Dominik
 */
require_once dirname(__FILE__) . '/bootstrap.php';
// Bootstrap this request (if not done already)
if (Lightwork::Type() == Lightwork::REQUEST_PAGE) {
    require LIB_DIR . 'pagehandler.php';
} else {
    if (Lightwork::Type() == Lightwork::REQUEST_SCRIPT) {
        require LIB_DIR . 'scripthandler.php';
    } else {
        if (Lightwork::Type() == Lightwork::REQUEST_FILE) {
            require LIB_DIR . 'filehandler.php';
        } else {
            if (Lightwork::Type() == Lightwork::REQUEST_CRONJOB) {
                require LIB_DIR . 'cronjobhandler.php';
            } else {
                if (Lightwork::Type() == Lightwork::REQUEST_SITEMAP) {
                    require LIB_DIR . 'sitemaphandler.php';
                }
            }
        }
    }
}
// This is a sitemap request