public function __construct(GitlabApi $api, SshKeysGenerator $keysGenerator, SettingsManager $settingsManager) { $this->api = $api; $this->keysGenerator = $keysGenerator; $this->settings = new GeneralSettings(); $settingsManager->loadSettings($this->settings); }
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; }
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); }
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); }