doc: natcasesort files

This commit is contained in:
Eric Lippmann 2016-04-01 15:01:12 +02:00
parent 48cd99aba3
commit 0edd1b5a08
1 changed files with 3 additions and 1 deletions

View File

@ -222,7 +222,9 @@ class DirectoryIterator implements RecursiveIterator
public function rewind()
{
if ($this->files === null) {
$this->files = new ArrayIterator(scandir($this->path));
$files = scandir($this->path);
natcasesort($files);
$this->files = new ArrayIterator($files);
}
$this->files->rewind();
$this->queue = array();