nextcloud/apps/user_ldap/lib/LDAPProviderFactory.php
Côme Chilliet c6f56ddbd7
fix(user_ldap): Remove usages of deprecated IServerContainer
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-02-26 13:31:26 +01:00

30 lines
689 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\User_LDAP;
use OCP\LDAP\ILDAPProvider;
use OCP\LDAP\ILDAPProviderFactory;
use Psr\Container\ContainerInterface;
class LDAPProviderFactory implements ILDAPProviderFactory {
public function __construct(
private ContainerInterface $serverContainer,
) {
}
public function getLDAPProvider(): ILDAPProvider {
return $this->serverContainer->get(LDAPProvider::class);
}
public function isAvailable(): bool {
return true;
}
}