Пример #1
0
 public function __construct(GitlabApi $api, SshKeysGenerator $keysGenerator, SettingsManager $settingsManager)
 {
     $this->api = $api;
     $this->keysGenerator = $keysGenerator;
     $this->settings = new GeneralSettings();
     $settingsManager->loadSettings($this->settings);
 }
Пример #2
0
 public static function createClient(SettingsManager $settingsManager)
 {
     $settings = new GeneralSettings();
     $settingsManager->loadSettings($settings);
     $client = new Client();
     $client->authenticate($settings->githubToken, null, Client::AUTH_HTTP_TOKEN);
     return $client;
 }
Пример #3
0
 public function __construct(EngineInterface $templating, FormFactoryInterface $formFactory, RouterInterface $router, EntityManagerInterface $em, FlashHelper $flashHelper, PaginatorInterface $paginator, SettingsManager $settingsManager)
 {
     $this->router = $router;
     $this->templating = $templating;
     $this->formFactory = $formFactory;
     $this->em = $em;
     $this->flashHelper = $flashHelper;
     $this->paginator = $paginator;
     $this->settings = new GeneralSettings();
     $settingsManager->loadSettings($this->settings);
 }
Пример #4
0
 public static function createClient(SettingsManager $settingsManager)
 {
     $settings = new GeneralSettings();
     $settingsManager->loadSettings($settings);
     return (new Client(sprintf('%s/api/%s/', $settings->gitlabServer, self::API_VERSION)))->authenticate($settings->gitlabToken, Client::AUTH_URL_TOKEN);
 }