1
0
mirror of https://github.com/php/doc-ru.git synced 2026-04-25 00:08:24 +02:00
Files
archived-doc-ru/reference/spl/norewinditerator/rewind.xml
T
2022-12-15 08:58:15 +03:00

89 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: d51166ca16fda8e766849505b84f9306ef443f71 Maintainer: northcat Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="norewinditerator.rewind" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>NoRewindIterator::rewind</refname>
<refpurpose>Предотвращает возврат внутреннего итератора в начало</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="NoRewindIterator">
<modifier>public</modifier> <type>void</type><methodname>NoRewindIterator::rewind</methodname>
<void/>
</methodsynopsis>
<para>
Предотвращает возврат внутреннего итератора в начало.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>NoRewindIterator::rewind</function></title>
<para>
Пример показывает, что вызов операции возврата в начало над объектом
NoRewindIterator не имеет никакого эффекта.
</para>
<programlisting role="php">
<![CDATA[
<?php
$fruits = array("лимон", "апельсин", "яблоко", "груша");
$noRewindIterator = new NoRewindIterator(new ArrayIterator($fruits));
echo $noRewindIterator->current() . "\n";
$noRewindIterator->next();
// возврат итератора в начало (ничего не должно случиться)
$noRewindIterator->rewind();
echo $noRewindIterator->current() . "\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
лимон
апельсин
]]>
</screen>
</example>
</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
-->