dkd / php-cmis-client

This is a PHP CMIS Client implementation based on OpenCMIS
Apache License 2.0
54 stars 34 forks source link

Sort cmis result #76

Open wallon-ines opened 3 years ago

wallon-ines commented 3 years ago

Is it to possible to sort cmis result natively in your php libraries ? eg: I want to sort result by name or CreationDate and if possible show folder first

Best regard

NamelessCoder commented 3 years ago

I would say this depends on the exact use case. If you are pulling all objects without pagination you can always use usort with a custom sorting function to achieve the result you want. If you need to use pagination then you would be limited to whichever sorting functions are provided by the CMIS service you connected - I would expect any such service to support sorting by creation date, but sorting folders on top may not be universally supported.