File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -339,20 +339,24 @@ Sorting Results
339339Sort the results by name, extension, size or type (directories first, then files)::
340340
341341 $finder->sortByName();
342+ $finder->sortByCaseInsensitiveName();
342343 $finder->sortByExtension();
343344 $finder->sortBySize();
344345 $finder->sortByType();
345346
346347.. versionadded :: 6.2
347348
348- The ``sortByExtension() `` and ``sortBySize() `` methods were introduced in Symfony 6.2.
349+ The ``sortByCaseInsensitiveName() ``, `` sortByExtension() `` and ``sortBySize() `` methods were introduced in Symfony 6.2.
349350
350351.. tip ::
351352
352353 By default, the ``sortByName() `` method uses the :phpfunction: `strcmp ` PHP
353354 function (e.g. ``file1.txt ``, ``file10.txt ``, ``file2.txt ``). Pass ``true ``
354355 as its argument to use PHP's `natural sort order `_ algorithm instead (e.g.
355356 ``file1.txt ``, ``file2.txt ``, ``file10.txt ``).
357+
358+ The ``sortByCaseInsensitiveName() `` method uses the case insensitive :phpfunction: `strcasecmp ` PHP function.
359+ Pass ``true `` as its argument to use PHP's case insensitive `natural sort order `_ algorithm instead (the :phpfunction: `strnatcasecmp ` PHP function)
356360
357361Sort the files and directories by the last accessed, changed or modified time::
358362
You can’t perform that action at this time.
0 commit comments