<?php define('ROOT_DIR', dirname(dirname(__DIR__)) . '/'); define('APP_DIR', ROOT_DIR . '/app/'); // PHP5.4 built-in web server support if (php_sapi_name() === 'cli-server') { $cli_filepath = preg_replace('/(\\?.*)\\z/', '', $_SERVER['REQUEST_URI']); if (is_file(__DIR__ . $cli_filepath)) { return false; } $_REQUEST['dc_action'] = preg_replace('/\\A\\//', '', $cli_filepath); } require_once ROOT_DIR . 'vendor/dietcake/dietcake/dietcake.php'; require_once CONFIG_DIR . 'bootstrap.php'; require_once CONFIG_DIR . 'core.php'; Dispatcher::invoke();
<?php require __DIR__ . '/../core/Dispatcher.php'; Dispatcher::invoke(['controller_dir' => __DIR__ . '/controller/', 'view_dir' => __DIR__ . '/views/', 'ignore_path' => '\\/sample']);
<?php /** * Copyright (c) 2015 by Robin Wieschendorf. All Rights * Reserved. Proprietary and Confidential - This source code is not for * redistribution. */ require_once '../library/core.php'; /***************** * SCRIPT - START * ******************/ $dispatcher = new Dispatcher(); $dispatcher->setDefaultRoute(['app', 'module', 'id', 'action']); $dispatcher->setIndexApp('public'); $dispatcher->setIndexModule('index'); $dispatcher->invoke();