gist/app/bootstrap.php.d/50-git.php
2015-05-06 22:24:42 +02:00

19 lines
455 B
PHP

<?php
use GitWrapper\GitWrapper;
use Gist\Service\GistService;
$app['gist_path'] = $app['root_path'].'/data/git';
$app['git_wrapper'] = function ($app) {
return new GitWrapper('/usr/bin/git');
};
$app['git_working_copy'] = function ($app) {
return $app['git_wrapper']->init($app['gist_path']);
};
$app['gist'] = function ($app) {
return new GistService($app['gist_path'], $app['git_wrapper'], $app['git_working_copy'], $app['geshi']);
};