Example #1
0
if (!is_dir($application) and is_dir(DOCROOT . $application)) {
    $application = DOCROOT . $application;
}
if (!is_dir($modules) and is_dir(DOCROOT . $modules)) {
    $modules = DOCROOT . $modules;
}
if (!is_dir($system) and is_dir(DOCROOT . $system)) {
    $system = DOCROOT . $system;
}
define('APPPATH', realpath($application) . DIRECTORY_SEPARATOR);
define('MODPATH', realpath($modules) . DIRECTORY_SEPARATOR);
define('SYSPATH', realpath($system) . DIRECTORY_SEPARATOR);
define('COMPOSERPATH', realpath($composer) . DIRECTORY_SEPARATOR);
unset($application, $modules, $system, $composer);
require APPPATH . 'bootstrap' . EXT;
if (AdminHREF::getSubdomain() == 'dev') {
    define('DEV', true);
    define('PRODUCTION', false);
} else {
    define('DEV', false);
    define('PRODUCTION', true);
}
if (PHP_SAPI == 'cli') {
    class_exists('Minion_Task') or die('Please enable the Minion module for CLI support.');
    set_exception_handler(['Minion_Exception', 'handler']);
    Minion_Task::factory(Minion_CLI::options())->execute();
} else {
    $request = Request::factory(true, [], false)->execute()->send_headers(true)->body();
    $request = \Zver\StringHelper::load($request)->trimSpaces();
    //$error = $request->getClone()
    //                 ->getPosition('#kohana_error');