<?php

require_once "vendor/autoload.php";
$configuration = new Bolt\Configuration\Composer(dirname(__DIR__));
$configuration->getVerifier()->removeCheck('apache');
$configuration->compat();
$configuration->verify();
$app = new Bolt\Application(array('resources' => $configuration));
$app->initialize();
$app->run();
Example #2
0
        define('BOLT_COMPOSER_INSTALLED', false);
        define('BOLT_PROJECT_ROOT_DIR', dirname(__DIR__));
        define('BOLT_WEB_DIR', BOLT_PROJECT_ROOT_DIR);
        // Set the config folder location. If we haven't set the constant in index.php, use one of the
        // default values.
        if (!defined('BOLT_CONFIG_DIR')) {
            if (is_dir(__DIR__ . '/config')) {
                // Default value, /app/config/..
                define('BOLT_CONFIG_DIR', __DIR__ . '/config');
            } else {
                // otherwise use /config, outside of the webroot folder.
                define('BOLT_CONFIG_DIR', dirname(dirname(__DIR__)) . '/config');
            }
        }
    }
}
// First, do some low level checks, like whether autoload is present, the cache
// folder is writable, if the minimum PHP version is present, etc.
require_once __DIR__ . '/classes/lib.php';
require_once __DIR__ . '/classes/lowlevelchecks.php';
$checker = new LowlevelChecks();
$checker->doChecks();
// Let's get on with the rest..
require_once BOLT_PROJECT_ROOT_DIR . '/vendor/autoload.php';
require_once __DIR__ . '/classes/util.php';
// Create the 'Bolt application'.
$app = new Bolt\Application();
// Finally, check if the app/database folder is writable, if it needs to be.
$checker->doDatabaseCheck($app['config']);
// Initialize the 'Bolt application': Set up all routes, providers, database, templating, etc..
$app->initialize();