https://github.com/daverandom/ldapi
Simple object oriented wrapper around ext/ldap
https://github.com/daverandom/ldapi
Last synced: 8 months ago
JSON representation
Simple object oriented wrapper around ext/ldap
- Host: GitHub
- URL: https://github.com/daverandom/ldapi
- Owner: DaveRandom
- License: mit
- Created: 2013-09-24T10:48:58.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-06-08T16:12:15.000Z (about 11 years ago)
- Last Synced: 2025-02-08T20:45:53.927Z (over 1 year ago)
- Language: PHP
- Size: 215 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
LDAPi
=====
A simple object oriented wrapper around PHP's LDAP extension. No frills, just a slightly cleaner API for use in object oriented applications.
Requirements
------------
- PHP 5.4.0 or higher
- ext/ldap
Installation
------------
Preferably via [Composer](http://getcomposer.org/).
Example usage
-------------
connect('127.0.0.1', 389);
$link->bind('Manager', 'managerpassword');
$result = $link->search('cn=Users', 'objectClass=User', ['cn']);
$entry = $result->firstEntry();
do {
print_r($entry->getAttributes());
} while($entry = $entry->nextEntry());
} catch(LDAPi\DirectoryOperationFailureException $e) {
exit('An error occurred: ' . $e->getMessage());
}