2011-08-16 11:38:58 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2009-07-11 08:59:47 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-12-24 12:30:24 +00:00
|
|
|
<refentry xml:id="arrayiterator.rewind" xmlns="http://docbook.org/ns/docbook">
|
2007-01-28 20:13:03 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>ArrayIterator::rewind</refname>
|
|
|
|
<refpurpose>Rewind array back to the start</refpurpose>
|
|
|
|
</refnamediv>
|
2008-03-20 01:25:04 +00:00
|
|
|
|
2007-12-24 12:30:24 +00:00
|
|
|
<refsect1 role="description">
|
2008-03-20 01:25:04 +00:00
|
|
|
&reftitle.description;
|
2007-01-28 20:13:03 +00:00
|
|
|
<methodsynopsis>
|
2012-01-17 08:20:53 +00:00
|
|
|
<modifier>public</modifier> <type>void</type><methodname>ArrayIterator::rewind</methodname>
|
2007-01-28 20:13:03 +00:00
|
|
|
<void/>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2008-03-20 01:25:04 +00:00
|
|
|
This rewinds the iterator to the beginning.
|
2007-01-28 20:13:03 +00:00
|
|
|
</para>
|
2008-03-20 01:25:04 +00:00
|
|
|
</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;
|
2007-01-28 20:13:03 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>ArrayIterator::rewind</function> example</title>
|
|
|
|
<programlisting role="php">
|
2004-04-13 15:14:06 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$arrayobject = new ArrayObject();
|
2004-02-24 10:51:40 +00:00
|
|
|
|
2004-04-13 15:14:06 +00:00
|
|
|
$arrayobject[] = 'zero';
|
|
|
|
$arrayobject[] = 'one';
|
|
|
|
$arrayobject[] = 'two';
|
2004-02-24 10:51:40 +00:00
|
|
|
|
2004-04-13 15:14:06 +00:00
|
|
|
$iterator = $arrayobject->getIterator();
|
|
|
|
|
|
|
|
$iterator->next();
|
|
|
|
echo $iterator->key(); //1
|
|
|
|
|
|
|
|
$iterator->rewind(); //rewinding to the begining
|
|
|
|
echo $iterator->key(); //0
|
|
|
|
?>
|
|
|
|
]]>
|
2007-01-28 20:13:03 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
2004-02-24 10:51:40 +00:00
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2004-02-24 10:51:40 +00:00
|
|
|
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
|
|
|
|
-->
|