1
0

LDAPProviderFactory.php 739 B

1234567891011121314151617181920212223242526272829
  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. /** * @var IServerContainer */
  13. private $serverContainer;
  14. public function __construct(IServerContainer $serverContainer) {
  15. $this->serverContainer = $serverContainer;
  16. }
  17. public function getLDAPProvider(): ILDAPProvider {
  18. return $this->serverContainer->get(LDAPProvider::class);
  19. }
  20. public function isAvailable(): bool {
  21. return true;
  22. }
  23. }