mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
23 lines
588 B
PHP
23 lines
588 B
PHP
<?php
|
|
|
|
namespace Git;
|
|
|
|
use Silex\Application;
|
|
use Silex\ServiceProviderInterface;
|
|
|
|
class GitServiceProvider implements ServiceProviderInterface
|
|
{
|
|
/**
|
|
* Register the Git\Client on the Application ServiceProvider
|
|
*
|
|
* @param Application $app Silex Application
|
|
* @return Git\Client Instance of the Git\Client
|
|
*/
|
|
public function register(Application $app)
|
|
{
|
|
$app['git'] = function () use ($app) {
|
|
$default = $app['git.client'] ? $app['git.client'] : '/usr/bin/git';
|
|
return new Client($app['git.client']);
|
|
};
|
|
}
|
|
} |