mirror of
https://github.com/php/doc-en.git
synced 2026-03-24 07:42:10 +01:00
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.
59 lines
1.4 KiB
XML
59 lines
1.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="emptyiterator.valid" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>EmptyIterator::valid</refname>
|
|
<refpurpose>Checks whether the current element is valid</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis role="EmptyIterator">
|
|
<modifier>public</modifier> <type>false</type><methodname>EmptyIterator::valid</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Checks whether the current element is valid.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
The <classname>EmptyIterator</classname> is always empty and will never have a valid value.
|
|
The return value is always &false;.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&false;
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|