예제 #1
0
}
/**
 * Set Path
 */
$path = isset($_GET['path']) ? rtrim($_GET['path'], '/') : 'index';
$index = explode('/', $path);
try {
    /**
     * Get Config
     */
    require_once APP_DIR . '/config.php';
    /**
     * Instantiate Controller & theme
     */
    $controller = new Controller($path, $index);
    $theme = new Theme($path, $index);
    /**
     * Include functions & classes
     */
    require_once APP_DIR . '/core/includes.php';
    if (ENVIRONMENT === 'development') {
        $theme->setDebug(true);
    }
    /**
     * Get template file
     */
    $template = $theme->load($path);
    /**
     * Load Controller file
     */
    require $controller->load($path);
예제 #2
0
define('ROOT_DIR', __DIR__);
/**
 * Set Path
 */
$path = isset($_GET['path']) ? rtrim($_GET['path'], '/') : 'index';
$index = explode('/', $path);
try {
    /**
     * Get Config
     */
    require_once 'site/_core/config.php';
    /**
     * Instantiate Controller & theme
     */
    $controller = new Controller($_config, $path, $index);
    $theme = new Theme($_config, $path, $index, array('cache' => false));
    /**
     * Include functions, classes & plugins
     */
    require_once 'site/_core/includes.php';
    /**
     * Get template file
     */
    $template = $theme->load($path);
    /**
     * Load Controller file
     */
    require $controller->load($path);
    /**
     * Render the Page
     */