php.net |  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
Votes:2
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phpbugs at geniusdex dot net
New email:
PHP Version: OS:

 

 [2014-06-04 08:08 UTC] phpbugs at geniusdex dot net
Description:
------------
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



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-04 09:22 UTC] salathe@php.net
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] salathe@php.net
-Assigned To: +Assigned To: salathe
 [2017-10-24 08:13 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: salathe +Assigned To:
 [2017-10-24 09:21 UTC] salathe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: salathe
 [2017-10-24 09:21 UTC] salathe@php.net
Re-assigning to me to keep visibility.
 [2018-01-28 13:18 UTC] vrana@php.net
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=http://docbook.org/ns/docbook) 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: Thu Nov 21 20:01:29 2024 UTC