1
0

LDAPProviderFactory.php 681 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\User_LDAP;
  8. use OCP\IServerContainer;
  9. use OCP\LDAP\ILDAPProvider;
  10. use OCP\LDAP\ILDAPProviderFactory;
  11. class LDAPProviderFactory implements ILDAPProviderFactory {
  12. public function __construct(
  13. /** * @var IServerContainer */
  14. private IServerContainer $serverContainer,
  15. ) {
  16. }
  17. public function getLDAPProvider(): ILDAPProvider {
  18. return $this->serverContainer->get(LDAPProvider::class);
  19. }
  20. public function isAvailable(): bool {
  21. return true;
  22. }
  23. }