|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67379 Not all implemented methods documented for some iterators
Submitted: 2014-06-04 08:08 UTC Modified: 2017-10-24 09:21 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: phpbugs at geniusdex dot net Assigned: salathe (profile)
Status: Assigned Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-06-04 08:08 UTC] phpbugs at geniusdex dot net
The documentation for some iterators does not contain all implemented methods. For example, the documentation for the following iterators do not include the valid() method, which is a required part of the Iterator interface:

- GlobIterator
- ParentIterator
- RecursiveCallbackFilterIterator
- RecursiveDirectoryIterator
- RecursiveRegexIterator
- RegexIterator
- RecursiveDirectoryIterator


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-04 09:22 UTC]
I think I see the problem. We only list inherited methods for one level of the inheritance tree. 

Take, for example, GlobIterator. We show its methods, and under "Inherited Methods" we list the methods its parent class (FilesystemIterator) implements.

We currently do not list methods inherited from grandparent classes. In this case, that would be DirectoryIterator, which is where the valid() method is implemented.

Perhaps we should convert this ticket to a feature request to list all inherited methods on each class's synopsis page.
 [2014-08-15 21:27 UTC]
-Assigned To: +Assigned To: salathe
 [2017-10-24 08:13 UTC]
-Status: Assigned +Status: Open -Assigned To: salathe +Assigned To:
 [2017-10-24 09:21 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: salathe
 [2017-10-24 09:21 UTC]
Re-assigning to me to keep visibility.
 [2018-01-28 13:18 UTC]
A complication is that there are many methods defined both in the parent and the grandparent, e.g. DirectoryIterator::current and FilesystemIterator::current.

Just including the grandparent (<xi:include xpointer="xmlns(db= xpointer(id('class.filesystemiterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />) would list these methods twice.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 17:01:29 2024 UTC