Files
GitList/boot.php
Christian Schorn 3400c29a0d Die when no config object provided
Just a friendlier error message, when `boot.php` is included without a
global `$config` object being set.
2012-10-31 18:14:20 +01:00

19 lines
571 B
PHP

<?php
if (!isset($config)) {
die("No configuration object provided.");
}
$config->set('git', 'repositories', rtrim($config->get('git', 'repositories'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);
// Startup and configure Silex application
$app = new GitList\Application($config, __DIR__);
// Mount the controllers
$app->mount('', new GitList\Controller\MainController());
$app->mount('', new GitList\Controller\BlobController());
$app->mount('', new GitList\Controller\CommitController());
$app->mount('', new GitList\Controller\TreeController());
return $app;