1
0

NullLDAPProviderFactory.php 535 B

12345678910111213141516171819202122232425
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\LDAP;
  8. use OCP\IServerContainer;
  9. use OCP\LDAP\ILDAPProviderFactory;
  10. class NullLDAPProviderFactory implements ILDAPProviderFactory {
  11. public function __construct(IServerContainer $serverContainer) {
  12. }
  13. public function getLDAPProvider() {
  14. throw new \Exception('No LDAP provider is available');
  15. }
  16. public function isAvailable(): bool {
  17. return false;
  18. }
  19. }