mirror of
https://github.com/php/doc-ja.git
synced 2026-03-23 22:52:11 +01:00
113 lines
3.4 KiB
XML
113 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: c777ef397d0c333ce142ab8122abcad2aa63ba83 Maintainer: takagi Status: ready -->
|
|
<reference xml:id="class.traversable" role="class" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
|
|
<title><interfacename>Traversable</interfacename> インターフェイス</title>
|
|
<titleabbrev>Traversable</titleabbrev>
|
|
|
|
<partintro>
|
|
|
|
<!-- {{{ Traversable intro -->
|
|
<section xml:id="traversable.intro">
|
|
&reftitle.intro;
|
|
<para>
|
|
そのクラスの中身が &foreach; を使用してたどれるかどうかを検出するインターフェイスです。
|
|
</para>
|
|
<para>
|
|
これは抽象インターフェイスであり、単体で実装することはできません。
|
|
<interfacename>IteratorAggregate</interfacename> あるいは
|
|
<interfacename>Iterator</interfacename> を実装しなければなりません。
|
|
</para>
|
|
</section>
|
|
<!-- }}} -->
|
|
|
|
<section xml:id="traversable.synopsis">
|
|
&reftitle.interfacesynopsis;
|
|
|
|
<!-- {{{ Synopsis -->
|
|
<classsynopsis class="interface">
|
|
<oointerface>
|
|
<interfacename>Traversable</interfacename>
|
|
</oointerface>
|
|
</classsynopsis>
|
|
<!-- }}} -->
|
|
|
|
<para>
|
|
このインターフェイスにはメソッドがありません。
|
|
traverse 可能なすべてのクラス用の基底インターフェイスとしてのみ存在しています。
|
|
</para>
|
|
|
|
</section>
|
|
|
|
<section role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>7.4.0</entry>
|
|
<entry>
|
|
<interfacename>Traversable</interfacename> インターフェイスは、抽象クラスによって実装できるようになりました。
|
|
これを拡張するには、
|
|
<interfacename>Iterator</interfacename> あるいは
|
|
<interfacename>IteratorAggregate</interfacename> を実装しなければなりません。
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</section>
|
|
|
|
<section role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
このインターフェイスを実装した内部(組み込み)クラスは、
|
|
&foreach; の中で使うことができます。
|
|
<interfacename>IteratorAggregate</interfacename> や
|
|
<interfacename>Iterator</interfacename> を実装する必要はありません。
|
|
</para>
|
|
</note>
|
|
<note>
|
|
<para>
|
|
PHP 7.4.0 より前のバージョンでは、
|
|
この内部的なエンジンのインターフェイスは
|
|
PHP スクリプトが実装できませんでした。
|
|
代わりに、
|
|
<interfacename>IteratorAggregate</interfacename>
|
|
か <interfacename>Iterator</interfacename> を使わなければなりませんでした。
|
|
</para>
|
|
</note>
|
|
</section>
|
|
|
|
</partintro>
|
|
|
|
</reference>
|
|
<!-- 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
|
|
-->
|