Пример #1
0
 public function createApplication()
 {
     $config = new GitList\Config();
     $config->set('app', 'debug', true);
     $config->set('app', 'debug', false);
     $config->set('git', 'client', self::$gitPath);
     $config->set('git', 'default_branch', 'master');
     $config->set('git', 'repositories', array(self::$tmpdir));
     $app = (require 'boot.php');
     return $app;
 }
Пример #2
0
<?php

/**
 * GitList 0.3
 * https://github.com/klaussilveira/gitlist
 */
// Set the default timezone for systems without date.timezone set in php.ini
if (!ini_get('date.timezone')) {
    date_default_timezone_set('UTC');
}
require 'vendor/autoload.php';
// Load configuration
$config = GitList\Config::fromFile('config.ini');
$app = (require 'boot.php');
$app->run();
Пример #3
0
<?php

// Load configuration
$config = new GitList\Config('config.ini');
$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;