daverandom/simpleldap

Extremely succinct object oriented LDAP client API

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/daverandom/simpleldap

dev-master 2013-09-25 17:50 UTC

This package is auto-updated.

Last update: 2025-09-25 09:27:49 UTC


README

An extremely succinct object oriented LDAP client API for PHP. Uses some dirty tricks to make code that consumes LDAP directories a lot shorter to write, while (hopefully) remaining fairly readable.

Requirements

  • PHP 5.4.0 or higher
  • ext/ldap
  • The LDAPi library

Installation

Preferably via Composer.

Example usage

This example produces the same result as the example for LDAPi

<?php

$link = (new SimpleLDAP\DirectoryFactory)->create('ldap://Manager:managerpassword@127.0.0.1:389');

foreach ($link->search('cn=Users', 'objectClass=User', ['cn']) as $entry) {
    print_r($entry->getAttributes());
}