aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/LDAP/ILDAPProviderFactory.php
blob: f175a3abfd0618186e45b756dddc8bffb8071710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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;
}