From b7ff23a295dd9295c22ed95ae43b3dc31ef55a44 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 13 Jul 2011 05:00:58 +0000 Subject: [PATCH] Reverting commits r313137 and r313138 (fixing build) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@313192 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/spl/appenditerator.xml | 4 +- reference/spl/appenditerator/construct.xml | 106 ++----------- reference/spl/multipleiterator.xml | 3 +- reference/spl/multipleiterator/construct.xml | 148 ++----------------- 4 files changed, 24 insertions(+), 237 deletions(-) diff --git a/reference/spl/appenditerator.xml b/reference/spl/appenditerator.xml index 600e14e1e9..5247a0c194 100644 --- a/reference/spl/appenditerator.xml +++ b/reference/spl/appenditerator.xml @@ -12,7 +12,7 @@
&reftitle.intro; - Consecutively iterates over all iterators appended to this iterator. + An Iterator that iterates over several iterators one after the other.
@@ -50,11 +50,11 @@ &Methods; - &InheritedMethods; + diff --git a/reference/spl/appenditerator/construct.xml b/reference/spl/appenditerator/construct.xml index 04098856b3..0e9b015b0e 100644 --- a/reference/spl/appenditerator/construct.xml +++ b/reference/spl/appenditerator/construct.xml @@ -6,32 +6,33 @@ AppendIterator::__construct Constructs an AppendIterator - + &reftitle.description; - - public - void + AppendIterator::__construct - + Constructs an AppendIterator. + + &warn.undocumented.func; + - + &reftitle.parameters; &no.function.parameters; - + &reftitle.returnvalues; &return.void; - + &reftitle.seealso; @@ -40,96 +41,7 @@ - - - - &reftitle.examples; - - - Iterating AppendIterator with foreach - -append($pizzas); -$appendIterator->append($toppings); - -foreach ($appendIterator as $key => $item) { - echo "$key => $item", PHP_EOL; -} -?> -]]> - - &example.outputs.similar; - - Margarita -1 => Siciliana -2 => Hawaii -0 => Cheese -1 => Anchovies -2 => Olives -3 => Pineapple -4 => Ham -]]> - - - - Iterating AppendIterator with the AppendIterator API - -append($pizzas); -$appendIterator->append($toppings); - -while ($appendIterator->valid()) { - printf( - '%s => %s => %s%s', - $appendIterator->getIteratorIndex(), - $appendIterator->key(), - $appendIterator->current(), - PHP_EOL - ); - $appendIterator->next(); -} -?> -]]> - - &example.outputs.similar; - - 0 => Margarita -0 => 1 => Siciliana -0 => 2 => Hawaii -1 => 0 => Cheese -1 => 1 => Anchovies -1 => 2 => Olives -1 => 3 => Pineapple -1 => 4 => Ham -]]> - - - - - - - &reftitle.notes; - - - When using iterator_to_array to copy the values of the AppendIterator - into an array, you have to set the optional use_key argument to - &false;. When use_key is not &false; any keys reoccuring in inner - iterators will get overwritten in the returned array. There is no way to preserve the original keys. - - - @@ -66,7 +66,6 @@ &Methods; - diff --git a/reference/spl/multipleiterator/construct.xml b/reference/spl/multipleiterator/construct.xml index b7f0a813d1..fa3eda6766 100644 --- a/reference/spl/multipleiterator/construct.xml +++ b/reference/spl/multipleiterator/construct.xml @@ -6,24 +6,21 @@ MultipleIterator::__construct Constructs a new MultipleIterator - + &reftitle.description; - - public - void + MultipleIterator::__construct - - int - flags - MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC - - + intflags + Construct a new MultipleIterator. + + &warn.undocumented.func; + - + &reftitle.parameters; @@ -33,30 +30,21 @@ The flags to set, according to the - Flag Constants. - - - MultipleIterator::MIT_NEED_ALL or MultipleIterator::MIT_NEED_ANY - - - MultipleIterator::MIT_KEYS_NUMERIC or MultipleIterator::MIT_KEYS_ASSOC - - + Flag Constants - Defaults to MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC. - + &reftitle.returnvalues; - &return.void; + The iterator. - + &reftitle.seealso; @@ -66,119 +54,7 @@ - - - - &reftitle.examples; - - - Iterating a MultipleIterator - -attachIterator($people, 'person'); -$team->attachIterator($roles, 'role'); - -foreach ($team as $member) { - print_r($member); -} -?> -]]> - - Output with $flags = MIT_NEED_ALL|MIT_KEYS_NUMERIC - - John - [1] => Developer -) -Array -( - [0] => Jane - [1] => Scrum Master -) -Array -( - [0] => Jack - [1] => Project Owner -)]]> - - Output with $flags = MIT_NEED_ANY|MIT_KEYS_NUMERIC - - John - [1] => Developer -) -Array -( - [0] => Jane - [1] => Scrum Master -) -Array -( - [0] => Jack - [1] => Project Owner -) -Array -( - [0] => Judy - [1] => -)]]> - - Output with $flags = MIT_NEED_ALL|MIT_KEYS_ASSOC - - John - [role] => Developer -) -Array -( - [person] => Jane - [role] => Scrum Master -) -Array -( - [person] => Jack - [role] => Project Owner -)]]> - - Output with $flags = MIT_NEED_ANY|MIT_KEYS_NUMERIC - - John - [role] => Developer -) -Array -( - [person] => Jane - [role] => Scrum Master -) -Array -( - [person] => Jack - [role] => Project Owner -) -Array -( - [person] => Judy - [role] => -)]]> - - - - -