CoreFiles by mySites.guru
LdapFactory.php41 lines, 938 bytes, from Joomla_4.3.1-Stable-Full_Package.zip
Raw History Compare with 4.3.0
md5
13f03ef1dcbf372504559576328a1b39
sha1
b61cfcd787d282d0024a3f1e02c4006952607fce
sha256
1ebf2f29815af1aa4062ae5ad79045e2df8cf69db6d743a61b0bd3f0d136224e
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\Plugin\Authentication\Ldap\Factory;

use Symfony\Component\Ldap\Ldap;
use Symfony\Component\Ldap\LdapInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('JPATH_PLATFORM') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Factory to create Ldap clients.
 *
 * @since  4.3.0
 */
class LdapFactory implements LdapFactoryInterface
{
    /**
     * Method to load and return an Ldap client.
     *
     * @param   array  $config  The configuration array for the ldap client
     *
     * @return  LdapInterface
     *
     * @since   4.3.0
     *
     * @throws  \Exception
     */
    public function createLdap(array $config): LdapInterface
    {
        return Ldap::create('ext_ldap', $config);
    }
}

The same content is in 10 releases, Joomla 4.3.0-beta1 to 4.3.1. See them all, or every version of this file.