PHPackages                             appserver-io/ldap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. appserver-io/ldap

ActiveLibrary

appserver-io/ldap
=================

LDAP integration for PHP application server

3.0.0(6y ago)0718↓75%12OSL-3.0PHPPHP &gt;=5.5.0 &lt; 7.0.0

Since May 17Pushed 6y ago4 watchersCompare

[ Source](https://github.com/appserver-io/ldap)[ Packagist](https://packagist.org/packages/appserver-io/ldap)[ Docs](https://github.com/appserver-io/console)[ RSS](/packages/appserver-io-ldap/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (6)Versions (6)Used By (2)

appserver.io LDAP
=================

[](#appserverio-ldap)

This is a basic LDAP integration that provides a Doctrine ORM like functionality for LDAP handling.

Data Source
-----------

[](#data-source)

To define a Data Source, simply add a XML file with a following structure to your application's `META-INF` directory

```

            ext_ldap
            cn=admin,dc=example,dc=org
            admin
            dc=example,dc=org
            127.0.0.1
            389

```

Persistence Manager
-------------------

[](#persistence-manager)

Configure the Persistence Manager in `META-INF/persistence.xml` like

```

```

Inject the Persistence Manager
------------------------------

[](#inject-the-persistence-manager)

The LDAP Persistence Manager can then be injected as a Doctrine Entity Manager, e. g.

```
/**
 * TechDivision\Project\Repositories\Ldap\RoleRepositoryInterface
 */

namespace AppserverIo\MyProject;

/**
 * Dummy implementation of a LDAP repository.
 */
class DummyRepository
{

    /**
     * The Symfony LDAP adapter instance.
     *
     * @var \AppserverIo\Appserver\PersistenceContainer\Doctrine\DoctrineEntityManagerProxy
     * @EPB\PersistenceUnit(unitName="MyLdapEntityManager")
     */
    protected $ldapEntityManager;
}
```

Persistence Manager Interface
-----------------------------

[](#persistence-manager-interface)

The LDAP Persistence Manager provides the following interface which gives you access to your LDAP.

> ATTENTION: In version 2.x `persist()` and `remove()` methods has not yet been implemented.

```
/**
 * AppserverIo\Ldap\EntityManagerInterface
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 *
 * PHP version 5
 *
 * @author    Tim Wagner
 * @copyright 2015 TechDivision GmbH
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 * @link      https://github.com/appserver-io/ldap
 * @link      http://www.appserver.io
 */

namespace AppserverIo\Ldap;

/**
 * The interface for all LDAP Entity Manager implementations.
 *
 * @author    Tim Wagner
 * @copyright 2015 TechDivision GmbH
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 * @link      https://github.com/appserver-io/ldap
 * @link      http://www.appserver.io
 */
interface EntityManagerInterface
{

    /**
     * Returns the LDAP client instance.
     *
     * @return \AppserverIo\Ldap\LdapClientInterface The LDAP client instance
     */
    public function getLdapClient();

    /**
     * Returns the persistence unit configuration instance.
     *
     * @return \AppserverIo\Description\Configuration\PersistenceUnitConfigurationInterface The configuration instance
     */
    public function getConfiguration();

    /**
     * Returns the base DN => database in datasource configuration.
     *
     * @return string The base DN
     */
    public function getBaseDn();

    /**
     * Returns the repository instance for the entity with the passed lookup name.
     *
     * @param string $lookupName The lookup name of the entity to return the repository for
     *
     * @return object The LDAP repository instance
     */
    public function getRepository($lookupName);

    /**
     * Finds an entity by its lookup name.
     *
     * @param string $lookupName The look name of the entity to find
     * @param mixed  $id         The identity of the entity to find
     *
     * @return object|null The entity instance or NULL if the entity can not be found.
     *
     * @throws \Exception
     */
    public function find($lookupName, $id);

    /**
     * Tells the EntityManager to make an instance managed and persistent.
     *
     * The entity will be entered into the database at or before transaction
     * commit or as a result of the flush operation.
     *
     * NOTE: The persist operation always considers entities that are not yet known to
     * this EntityManager as NEW. Do not pass detached entities to the persist operation.
     *
     * @param object $entity The instance to make managed and persistent
     *
     * @return void
     * @throws \Exception
     */
    public function persist($entity);

    /**
     * Removes an entity instance.
     *
     * A removed entity will be removed from the database at or before transaction commit
     * or as a result of the flush operation.
     *
     * @param object $entity The entity instance to remove
     *
     * @return void
     * @throws \Exception
     */
    public function remove($entity);
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Total

5

Last Release

2520d ago

Major Versions

1.0.1 → 2.0.02019-05-21

2.0.1 → 3.0.02019-06-21

PHP version history (2 changes)1.0.0PHP &gt;=5.6.0 &lt; 7.0.0

2.0.1PHP &gt;=5.5.0 &lt; 7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/76b54aaecf7287a0520eec0009161ca457982dee83ac413bfa0d818b72d79947?d=identicon)[wagnert](/maintainers/wagnert)

---

Top Contributors

[![wagnert](https://avatars.githubusercontent.com/u/287509?v=4)](https://github.com/wagnert "wagnert (15 commits)")

---

Tags

ldap php application server

### Embed Badge

![Health badge](/badges/appserver-io-ldap/health.svg)

```
[![Health](https://phpackages.com/badges/appserver-io-ldap/health.svg)](https://phpackages.com/packages/appserver-io-ldap)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
