aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/LDAP/ILDAPProviderFactory.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/LDAP/ILDAPProviderFactory.php')
-rw-r--r--lib/public/LDAP/ILDAPProviderFactory.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/public/LDAP/ILDAPProviderFactory.php b/lib/public/LDAP/ILDAPProviderFactory.php
new file mode 100644
index 00000000000..720027ce012
--- /dev/null
+++ b/lib/public/LDAP/ILDAPProviderFactory.php
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCP\LDAP;
+
+use OCP\IServerContainer;
+
+/**
+ * Interface ILDAPProviderFactory
+ *
+ * This class is responsible for instantiating and returning an ILDAPProvider
+ * instance.
+ *
+ * @since 11.0.0
+ */
+interface ILDAPProviderFactory {
+ /**
+ * Constructor for the LDAP provider factory
+ *
+ * @param IServerContainer $serverContainer server container
+ * @since 11.0.0
+ */
+ public function __construct(IServerContainer $serverContainer);
+
+ /**
+ * creates and returns an instance of the ILDAPProvider
+ *
+ * @return ILDAPProvider
+ * @since 11.0.0
+ */
+ public function getLDAPProvider();
+
+ /**
+ * Check if an ldap provider is available
+ *
+ * @return bool
+ * @since 21.0.0
+ */
+ public function isAvailable(): bool;
+}