ZF-8274: No ability to specify URI when connecting to LDAP server using Zend_Ldap
The current Zend_Ldap implementation expects host, portnumber, ssl and tls settings to connect to a directory server. However, this doesn't allow to connect to a socket (when running OpenLDAP on the same server for instance). Also, there's quite some lines of code figuring out the URI that one could specify immediately, but after those lines is an if that discards it all if there was no SLL used.
Personally I'd like to give an URI to ldap_connect, because it also allows failover to other servers. I currently specify 5 servers when connecting to LDAP, so I made my own class that extends Zend_Ldap and overrides the connect function.
I think there must be a sane way to implement this without dropping backwards compatibility, for instance by adding an URI option and using connect with URI when the option is set. Also, ldap_connect should connect to the default server specified in the ldap config files if no arguments are given, it seems to me this currently isn't possible either.