ls()
boolean ls([string filter] [, string dn])
The ls() function will get a listing of the directories (DNs) under
the current working directory. If filter is supplied, then the specified
filter will be applied to the listing. If dn is supplied, the specified
directory (DN) will be used instead of the current working directory.
It will return TRUE if the search was successful, otherwise it will return
FALSE. Keep in mind that a successful search does not neccessarily return
any entries.
The ls() function only performs the search. You will need to use
the fetch() function to retrieve the data.
For information on LDAP search filters, look at the ldap_search man page, or
visit RFC 1558.
Example:
$ldap = new LDAP();
$ldap->cd("ou=people, dc=ypass, dc=net");
$ldap->ls();
...
$attrs[$ldap->getDN()] = $ldap->fetch();
...
$ldap->ls("(objectclass=person)");
...
$attrs[$ldap->getDN()] = $ldap->fetch();
...