Comments

Changing the sort direction is a PHP-one-liner - I doubt it'll make sense to add another parameter to the already very long method signature of {{Zend_Ldap::search()}}. This functionality can easily be provided by user-land code.

Generall I like the idea of modifying the LDAP options properties' names but it won't be sufficient to provide this functionality in {{Zend_Ldap::search()}} - there are a lot more methods where a change would be necessary. I doubt that the work will be worth the effort as you won't gain anything new (LDAP attributes are case-insensitiv per se).

the option to change the attributes' names will not be added as the component favors lowercase attribute names in general

the option to reverse the sort direction cannot be added to {{Zend_Ldap::search()}} because the component relies solely on the LDAP server's capability to sort a result set. Results are retrieved sequentially from the server instead of instantiating the complete result set all at once. The option will be added {{to Zend_Ldap::searchEntries()}} as the whole result set is available here.

Both {{to Zend_Ldap::searchEntries()}} and {{Zend_Ldap::search()}} will be changed to accept an array parameter to remove the need to work through all the methods' parameters.

Posted by Stefan Gehrig (sgehrig) on 2009-11-06T04:06:24.000+0000

fixed in trunk (r18883):
added {{$reverseSort}} argument to {{Zend_Ldap::searchEntries()}}
added possibility to pass parameters to {{Zend_Ldap::searchEntries()}} and {{Zend_Ldap::search()}} in a single array argument

Couldn't you add the 'resultChangeCase' function on {{Zend_Ldap::searchEntries()}} ?

Treating results' case in the source ({{Zend_Ldap::searchEntries()}}) would be better than treat one by one later. Considering that most of AD servers' entries aren't standardized, I think that it's better all come in one single case format (lower or upper for me) and then work upon results.

What do you think about it ? :)

Posted by Stefan Gehrig (sgehrig) on 2009-11-06T04:48:24.000+0000

Attribute names are already normalized to lower-case. I think there is no need to add this option just for the sake of cosmetics.