Propose alternative sort method (LSsearch / LSattr_html::select_list / LSattr_html::select_object)
LdapSaisie use strcoll() to sort list but in some cases, "natural sort" method could be better, for instance, when data to sort contain numbers.
The problem with "natural sort" in PHP : it's doesn't handle correctly localized-character as strcoll(). However, it's possible to propose a solution by normalizing string before using strnatcmp() but it will be at the expense of the performance.
I propose to add 3 sort methods :
- default using strcoll()
- natural using strnatcmp()
- natural_localized using withoutAccents() and strnatcmp()
I join a implementation demo of this 3 sort methods : demo.php