1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-24 07:42:10 +01:00

13 Commits

Author SHA1 Message Date
Andrew Lyons
8230e70922 Clarify usage of Iterator::valid methods (#3292)
This commit updates the documentation for the `valid` method of the
following iterators:

- `EmptyIterator` - add a note that this will always return false
- `FilterIterator` - add a note that the value will be false until the
  pointer is advanced to the first valid element
- `IteratorIterator` - clarify that the method checks if the element is
  valid.

These now match the source.

I have checked other iterators and these seem to be correctly
documented.

It's worth noting that the `ArrayIterator::valid` method behaves
differently - it checks if the next element is valid (confirmed in
source).

The `DirectoryIterator::valid` method may also be incorrectly
documented but I am not 100% sure of this. The documentation states
that the method checks if it is a valid _file_, but I believe that the
method checks if the Iterator element is valid.
2024-03-28 22:57:53 +01:00
Alexandre Daubois
ff4e9f7762 Fix GH-1144: Document second argument of IteratorIterator::__construct() (#2627) 2023-07-31 14:35:07 +01:00
Máté Kocsis
d51166ca16 Add ext/spl methodsynopsis roles (#2073) 2022-12-13 10:33:30 +01:00
George Peter Banyard
fda6c4efe2 Update SPL class construtor pages (#1466)
Add missing changelogs for changes in PHP 8
2022-04-07 12:40:48 +01:00
Máté Kocsis
60809ebcf7 Generate ext/spl methodsynopses based on stubs (#624) 2021-08-11 23:44:41 +02:00
Levi Morrison
13f8760951 Fix IteratorIterator::key() return type
Years ago this was `void`, and I erroneously changed it to `scalar`. It will delegate to the sub-iterator's get_current_key handler, which can return any kind of zval.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346694 c90b9560-bf6c-de11-be94-00142212c4b1
2019-02-04 01:49:54 +00:00
Jakub Vrana
e3b9788fa7 Fix iterators' key() return type
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328297 c90b9560-bf6c-de11-be94-00142212c4b1
2012-11-09 23:12:56 +00:00
Jakub Vrana
d8b968e63c Document public constructors
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@321901 c90b9560-bf6c-de11-be94-00142212c4b1
2012-01-08 05:33:58 +00:00
Peter Cowburn
8544f5925a getinneriterator() can return traversable (doc #55480)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@315319 c90b9560-bf6c-de11-be94-00142212c4b1
2011-08-22 23:50:47 +00:00
Peter Cowburn
28e760d63b iteratoriterator method return types (doc #55480)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@315318 c90b9560-bf6c-de11-be94-00142212c4b1
2011-08-22 23:45:29 +00:00
Torben Wilson
af4410a7e1 Normalized the sgml-default-dtd-file local-variable line for those
still using this, after discussion on the phpdoc list.
From now on, manual.ced will need to be found at ~/.phpdoc/manual.ced.



git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288721 c90b9560-bf6c-de11-be94-00142212c4b1
2009-09-25 07:04:39 +00:00
Nilgün Belma Bugüner
e3d8be23f8 fixed properties
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@283837 c90b9560-bf6c-de11-be94-00142212c4b1
2009-07-11 08:59:47 +00:00
Philip Olson
65049d5b8c Briefly documented IteratorIterator
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@278162 c90b9560-bf6c-de11-be94-00142212c4b1
2009-04-02 07:20:24 +00:00