gist/app/bootstrap.php.d/50-git.php
Simon Vieille 51d736cb1a Controller: refactoring ($app access)
"GistService" renamed as "Gist"
Authentication
2015-11-23 13:19:13 +01:00

19 lines
480 B
PHP

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