cvs: php-src /ext/spl README spl.php

From: Date: Mon, 01 Nov 2004 18:01:07 +0000
Subject: cvs: php-src /ext/spl README spl.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-29092@lists.php.net to get a copy of this message
helly Mon Nov 1 13:01:07 2004 EDT Modified files: /php-src/ext/spl README spl.php Log: - Update docu http://cvs.php.net/diff.php/php-src/ext/spl/README?r1=1.7&r2=1.8&ty=u Index: php-src/ext/spl/README diff -u php-src/ext/spl/README:1.7 php-src/ext/spl/README:1.8 --- php-src/ext/spl/README:1.7 Tue Mar 9 12:47:28 2004 +++ php-src/ext/spl/README Mon Nov 1 13:01:06 2004 @@ -4,47 +4,4 @@ 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). +For more information look at: http://php.net/~helly/php/ext/spl http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.37&r2=1.38&ty=u Index: php-src/ext/spl/spl.php diff -u php-src/ext/spl/spl.php:1.37 php-src/ext/spl/spl.php:1.38 --- php-src/ext/spl/spl.php:1.37 Mon Nov 1 12:39:59 2004 +++ php-src/ext/spl/spl.php Mon Nov 1 13:01:06 2004 @@ -14,9 +14,85 @@ * SPL - Standard PHP Library * * SPL is a collection of interfaces and classes that are meant to solve - * standard problems. + * standard problems and implements some efficient data access interfaces + * and classes. You'll find the classes documented using php code in the + * file spl.php or in corresponding .inc files in subdirectories examples + * and internal. 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.inc into your autoprepend file or that + * you have to point your ini setting auto_prepend_file to that file. + * + * Below is a list of interfaces/classes already availabel natively through + * the SPL extension grouped by category. + * + * 1) Iterators + * + * SPL offers some advanced iterator algorithms: + * + * - interface RecursiveIterator implements Iterator + * - interface OuterIterator extends Iterator + * - class RecursiveIteratorIterator implements OuterIterator + * - abstract class FilterIterator implements OuterIterator + * - class ParentIterator extends FilterIterator implements RecursiveIterator + * - interface SeekableIterator implements Iterator + * - class LimitIterator implements OuterIterator + * - class CachingIterator implements OuterIterator + * - class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator + * - class IteratorIterator implements OuterIterator + * - class NoRewindIterator implements OuterIterator + * - class EmptyIterator implements Iterator + * - class InfiniteIterator extends IteratorIterator + * - class AppendIterator implements OuterIterator + * + * 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 + * + * 5) Counting * - * A nice article about it can be found + * - interface Counable allows to hook into the standard array function count(). + * + * 6) Exceptions + * + * SPL provides a set of standard exception classes each meant to indicate a + * certain problem type. + * + * - class LogicException extends Exception + * - class BadFunctionCallException extends LogicException + * - class BadMethodCallException extends BadFunctionCallException + * - class DomainException extends LogicException + * - class InvalidArgumentException extends LogicException + * - class LengthException extends LogicException + * - class OutOfRangeException extends LogicException + * - class RuntimeException extends Exception + * - class OutOfBoundsException extends RuntimeException + * - class OverflowException extends RuntimeException + * - class RangeException extends RuntimeException + * - class UnderflowException extends RuntimeException + * + * As the above suggest an ArrayObject creates an ArrayIterator when it comes to + * iteration (e.g. ArrayObject instance used inside foreach). + * + * A nice article about SPL can be found * <a href="http://www.sitepoint.com/article/php5-standard-library/1">here</a>. * * You can download this documentation as a chm file @@ -646,14 +722,14 @@ /** Construct an instance form a RecursiveIterator. * * @param $iterator inner iterator - * @param flags Bitmask: + * @param $flags Bitmask: * - CIT_CALL_TOSTRING whether to call __toString() for * every element. This is optional since it is not * always used nad takes an additional fcall. * - CIT_CATCH_GET_CHILD whether to catch exceptions when * trying to get childs) */ - function __construct(RecursiveIterator $iterator, $getStrVal); + function __construct(RecursiveIterator $iterator, $flags = CIT_CALL_TOSTRING); } /** @ingroup SPL

« previous php.cvs (#29092) next »