lib/Storage/Driver/Xml/HistoryIterator.php
private function getEntryIterator()
    {
        $files = $this->days->current();
        $files = new \DirectoryIterator($this->days->current());
        $historyEntries = [];

        foreach ($files as $file) {
            if (!$file->isFile()) {
                continue;
            }

            if ($file->getExtension() !== 'xml') {
                continue;
            }

            $historyEntries[] = $this->getHistoryEntry($file->getPathname());
        }
        usort($historyEntries, function ($entry1, $entry2) {
            if ($entry1->getDate()->format('U') === $entry2->getDate()->format('U')) {
                return;
            }

            return $entry1->getDate()->format('U') < $entry2->getDate()->format('U');
        });

        return new \ArrayIterator($historyEntries);
    }
private function getEntryIterator()
    {
        $files = $this->days->current();
        $files = new \DirectoryIterator($this->days->current());
        $historyEntries = [];

        foreach ($files as $file) {
            if (!$file->isFile()) {
                continue;
            }

            if ($file->getExtension() !== 'xml') {
                continue;
            }

            $historyEntries[] = $this->getHistoryEntry($file->getPathname());
        }
        usort($historyEntries, function ($entry1, $entry2) {
            if ($entry1->getDate()->format('U') === $entry2->getDate()->format('U')) {
                return;
            }

            return $entry1->getDate()->format('U') < $entry2->getDate()->format('U');
        });

        return new \ArrayIterator($historyEntries);
    }
private function getEntryIterator ( ) { $ files = $ this -> days -> current ( ) ; $ files = new \ DirectoryIterator ( $ this -> days -> current ( ) ) ; $ historyEntries = [ ] ; foreach ( $ files as $ file ) { if ( ! $ file -> isFile ( ) ) { continue ; } if ( $ file -> getExtension ( ) !== 'xml' ) { continue ; } $ historyEntries [ ] = $ this -> getHistoryEntry ( $ file -> getPathname ( ) ) ; } usort ( $ historyEntries , function ( $ entry1 , $ entry2 ) { if ( $ entry1 -> getDate ( ) -> format ( 'U' ) === $ entry2 -> getDate ( ) -> format ( 'U' ) ) { return ; } return $ entry1 -> getDate ( ) -> format ( 'U' ) < $ entry2 -> getDate ( ) -> format ( 'U' ) ; } ) ; return new \ ArrayIterator ( $ historyEntries ) ; }
Return an iterator for the history entries.

We hydrate all of the entries for the "current" day.

@return \ArrayIterator
Return an iterator for the history entries .