<?php /* -- Global Parameters */ define('APP_ROOT', __DIR__ . '/'); define('APP_SRC', APP_ROOT . 'src/'); define('APP_SETTINGS', APP_ROOT . 'settings/'); define('APP_BUNDLE', APP_SRC . 'Application/'); define('APP_TEMPLATE', APP_ROOT . '/template/'); define('APP_VENDOR', APP_ROOT . '/vendor/'); define('APP_ENVIRONMENT', 'dev'); /* -- Composer */ require APP_VENDOR . 'autoload.php'; /* -- Application Instance */ $app = new Application\Application(); $app['environment'] = APP_ENVIRONMENT; /* -- Bundle Loader */ foreach (include APP_SETTINGS . 'bundles.php' as $mountPoint => $bundleName) { $bundleName .= '\\' . $bundleName . 'Bundle'; $app->register($bundle = new $bundleName()); $app->mount($mountPoint, $bundle); } return $app;