mirror of
https://github.com/php/php-src.git
synced 2024-12-12 19:33:31 +08:00
.. | ||
examples | ||
internal | ||
tests | ||
config.m4 | ||
config.w32 | ||
CREDITS | ||
doxygen.cfg | ||
package.xml | ||
php_spl.c | ||
php_spl.h | ||
README | ||
spl_array.c | ||
spl_array.h | ||
spl_directory.c | ||
spl_directory.h | ||
spl_engine.c | ||
spl_engine.h | ||
spl_functions.c | ||
spl_functions.h | ||
spl_iterators.c | ||
spl_iterators.h | ||
spl_sxe.c | ||
spl_sxe.h | ||
spl.php | ||
TODO |
This is an extension that aims to implement some efficient data access interfaces and classes. You'll find the classes documented using php code in the file spl.php or in the corresponding .inc file in the examples subdirectory. Based on the internal implementations or the files in the examples subdirectory there are also some .php files to experiment with. The .inc files are not included automatically because they are sooner or later integrated into the extension. That means that you either need to put the code of examples/autoload into your autoprepend file or that you have to point your ini setting auto_prepend_file to this file. Below is a list of interfaces/classes already availabel natively through the SPL extension grouped by category. For more information refer to the docuement spl.php. 1) Iterators SPL offers some advanced iterator algorithms: interface RecursiveIterator implements Iterator class RecursiveIteratorIterator implements Iterator abstract class FilterIterator implements Iterator class ParentIterator extends FilterIterator implements RecursiveIterator interface SeekableIterator implements Iterator class LimitIterator implements Iterator class CachingIterator implements Iterator class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator 2) Directories SPL offers two advanced directory classes: class DirectoryIterator implements Iterator class RecursiveDirectoryIterator extends DirectoryIterator implements RecursiveIterator 3) XML SPL offers an advanced XML handling class: class SimpleXMLIterator extends simplexml_element extends recursiveiterator 4) Array Overloading SPL offers advanced Array overloading: class ArrayObject implements IteratorAggregate class ArrayIterator implements Iterator As the above suggest an ArrayObject creates an ArrayIterator when it comes to iteration (e.g. ArrayObject instance used inside foreach).