Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Aggregate.php
Book.php
BookShelf.php
BookShelfIterator.php
Iterator.php
PreBookShelf.php
PreBookShelfIterator.php
README.md

README.md

Iterator

Iterator ― 1つ1つ数え上げる

登場人物

Aggregator

集合

Iterator

集合を数える人

ex)

シンプルに実装した場合

Aggregate tests/Iterator/BookShelf Iterator tests/Iterator/BookShelfIterator

PHPの場合、定義済みのインターフェイスがあるのでそれを使うと良い

http://php.net/manual/ja/class.iteratoraggregate.php http://php.net/manual/ja/class.iterator.php

Aggregate tests/Iterator/PreBookShelf Iterator tests/Iterator/PreBookShelfIterator

You can’t perform that action at this time.