mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Initial commit
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269020 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7bb1fc7e9b
commit
adf50f02c2
2 changed files with 183 additions and 0 deletions
121
language/predefined/iteratoraggregate.xml
Normal file
121
language/predefined/iteratoraggregate.xml
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.iteratoraggregate" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<title>The IteratorAggregate interface</title>
|
||||
<titleabbrev>IteratorAggregate</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
|
||||
<!-- {{{ IteratorAggregate intro -->
|
||||
<section xml:id="iteratoraggregate.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
Interface to create an external Iterator.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<section xml:id="iteratoraggregate.synopsis">
|
||||
&reftitle.classsynopsis;
|
||||
|
||||
<!-- {{{ Synopsis -->
|
||||
<classsynopsis>
|
||||
<ooclass><classname>IteratorAggregate</classname></ooclass>
|
||||
|
||||
<!-- {{{ Class synopsis -->
|
||||
<classsynopsisinfo>
|
||||
<ooclass>
|
||||
<classname>IteratorAggregate</classname>
|
||||
</ooclass>
|
||||
|
||||
<oointerface>
|
||||
<interfacename>Traversable</interfacename>
|
||||
</oointerface>
|
||||
</classsynopsisinfo>
|
||||
<!-- }}} -->
|
||||
|
||||
<classsynopsisinfo role="comment">Methods</classsynopsisinfo>
|
||||
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.iteratoraggregate')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
|
||||
</classsynopsis>
|
||||
<!-- }}} -->
|
||||
|
||||
</section>
|
||||
|
||||
<section xml:id="iteratoraggregate.examples">
|
||||
<example xml:id="iteratoraggregate.example.basic"><!-- {{{ -->
|
||||
<title>Basic usage</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
class myData implements IteratorAggregate {
|
||||
public $property1 = "Public property one";
|
||||
public $property2 = "Public property two";
|
||||
public $property3 = "Public property three";
|
||||
|
||||
public function __construct() {
|
||||
$this->property4 = "last property";
|
||||
}
|
||||
|
||||
public function getIterator() {
|
||||
return new ArrayIterator($this);
|
||||
}
|
||||
}
|
||||
|
||||
$obj = new myData;
|
||||
|
||||
foreach($obj as $key => $value) {
|
||||
var_dump($key, $value);
|
||||
echo "\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
string(9) "property1"
|
||||
string(19) "Public property one"
|
||||
|
||||
string(9) "property2"
|
||||
string(19) "Public property two"
|
||||
|
||||
string(9) "property3"
|
||||
string(21) "Public property three"
|
||||
|
||||
string(9) "property4"
|
||||
string(13) "last property"
|
||||
|
||||
]]>
|
||||
</screen>
|
||||
</example><!-- }}} -->
|
||||
</section>
|
||||
|
||||
|
||||
</partintro>
|
||||
|
||||
&language.predefined.iteratoraggregate.getiterator;
|
||||
|
||||
</phpdoc:classref>
|
||||
|
||||
<!-- 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:"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
|
||||
-->
|
62
language/predefined/iteratoraggregate/getiterator.xml
Normal file
62
language/predefined/iteratoraggregate/getiterator.xml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
|
||||
<refentry xml:id="iteratoraggregate.getiterator" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>IteratorAggregate::getIterator</refname>
|
||||
<refpurpose>Retrieve an external iterator</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>abstract</modifier> <modifier>public</modifier> <type>Traversable</type><methodname>IteratorAggregate::getIterator</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns an external iterator.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
&no.function.parameters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
An instance of an object implementing <classname>Iterator</classname> or
|
||||
<classname>Traversable</classname>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="errors"><!-- {{{ -->
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Throws an <classname>Exception</classname> on failure.
|
||||
</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:"../../../../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
|
||||
-->
|
Loading…
Reference in a new issue