Iterator and SPL Classes and Interfaces
This chapter demonstrates many classes, abstract classes, and interfaces, yet it only begins to touch on the full nature of SPL.
Table 6-3 is a quick-reference guide to the complete collection of SPL iterators, including some not mentioned in this chapter. For more information, see the SPL section of the PHP Manual at http://www.php.net/spl.
Table 6-3. Iterator and SPL classes and interfaces
|
Name |
Type |
Relationship |
Description |
|---|---|---|---|
|
|
Class |
Implements |
Converts arrays and objects into iterators |
|
|
Class |
Implements |
Used by |
|
|
Class |
Implements |
Provides “look ahead by one”
capability using |
|
|
Class |
Extends |
Adds caching support to recursive iterators |
|
|
Class |
Implements |
An iterator for directory files |
|
|
Abstract class |
Implements |
Allows filtering of other iterators using |
|
|
Interface |
Defines |
Implements an iterator |
|
|
Interface |
Defines |
Allows classes to control iteration by returning iterator from
|
|
|
Class |
Implements |
Emulates database |
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access