Hi.
I'm in the process of getting the PHPDoc classes showing the correct
inherited properties and methods (public/protected but not private).
I picked RecursiveRegexIterator (it has the largest number of
xi:includes in the documentation) as a test.
Using php --rc I see that the inheritance chain is
RecursiveRegexIterator, RegexIterator, FilterIterator and
IteratorIterator.
The property $replacement is part of RegexIterator.
I can see no documentation for this in phpdoc, nor in the Doxygen at
http://www.php.net/~helly/php/ext/spl/
In all the examples I've made so far, var_dump()
-ing the RegexIterator
results in a ["replacement"]=>NULL
Assigning a value to $replacement seems to have no bearing on the output.
Regards,
Richard.
--
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
-----Original Message-----
From: Richard Quadling [mailto:rquadling@googlemail.com]
Sent: 05 May 2010 17:26
To: PHP internals; PHP Documentation List
Subject: [PHP-DEV] What is the use of the $replacement
property in the RegexIterator class.Hi.
I'm in the process of getting the PHPDoc classes showing the
correct inherited properties and methods (public/protected
but not private).I picked RecursiveRegexIterator (it has the largest number of
xi:includes in the documentation) as a test.Using php --rc I see that the inheritance chain is
RecursiveRegexIterator, RegexIterator, FilterIterator and
IteratorIterator.The property $replacement is part of RegexIterator.
I can see no documentation for this in phpdoc, nor in the
Doxygen at http://www.php.net/~helly/php/ext/spl/In all the examples I've made so far,
var_dump()
-ing the
RegexIterator results in a ["replacement"]=>NULLAssigning a value to $replacement seems to have no bearing on
the output.Regards,
Richard.
Does seem odd public property. Guessing it's a bug.
http://www.php.net/~helly/classbrowser/?class=RecursiveRegexIterator
Jared
Hi.
I'm in the process of getting the PHPDoc classes showing the correct
inherited properties and methods (public/protected but not private).I picked RecursiveRegexIterator (it has the largest number of
xi:includes in the documentation) as a test.Using php --rc I see that the inheritance chain is
RecursiveRegexIterator, RegexIterator, FilterIterator and
IteratorIterator.The property $replacement is part of RegexIterator.
I can see no documentation for this in phpdoc, nor in the Doxygen at
http://www.php.net/~helly/php/ext/spl/In all the examples I've made so far,
var_dump()
-ing the RegexIterator
results in a ["replacement"]=>NULLAssigning a value to $replacement seems to have no bearing on the output.
I believe the intention was to give that property a value which could
be used with RegexIterator::REPLACE mode but that particular mode has
not yet been fully implemented. There is a related bug (
http://bugs.php.net/50579 ) that has not been assigned; I can't say
what the plan is for if/when the replacement mode will get some
attention. See also: the PHP implementation of RegexIterator (
http://svn.php.net/viewvc/php/php-src/trunk/ext/spl/internal/regexiterator.inc?view=markup
).
Regards,
Richard.
--
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
Hi.
I'm in the process of getting the PHPDoc classes showing the correct
inherited properties and methods (public/protected but not private).I picked RecursiveRegexIterator (it has the largest number of
xi:includes in the documentation) as a test.Using php --rc I see that the inheritance chain is
RecursiveRegexIterator, RegexIterator, FilterIterator and
IteratorIterator.The property $replacement is part of RegexIterator.
I can see no documentation for this in phpdoc, nor in the Doxygen at
http://www.php.net/~helly/php/ext/spl/In all the examples I've made so far,
var_dump()
-ing the RegexIterator
results in a ["replacement"]=>NULLAssigning a value to $replacement seems to have no bearing on the output.
I believe the intention was to give that property a value which could
be used with RegexIterator::REPLACE mode but that particular mode has
not yet been fully implemented. There is a related bug (
http://bugs.php.net/50579 ) that has not been assigned; I can't say
what the plan is for if/when the replacement mode will get some
attention. See also: the PHP implementation of RegexIterator (
http://svn.php.net/viewvc/php/php-src/trunk/ext/spl/internal/regexiterator.inc?view=markup
).Regards,
Richard.
--
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
So, this should be documented as what?
As we don't document the future, I think this property should be
omitted from the RegexIterator documentation until such time the
property is useful.
Basically, leave it as is.
Yes?
--
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
On 11 May 2010 13:33:46 UTC+1, Richard Quadling
rquadling@googlemail.com wrote:
Hi.
I'm in the process of getting the PHPDoc classes showing the correct
inherited properties and methods (public/protected but not private).I picked RecursiveRegexIterator (it has the largest number of
xi:includes in the documentation) as a test.Using php --rc I see that the inheritance chain is
RecursiveRegexIterator, RegexIterator, FilterIterator and
IteratorIterator.The property $replacement is part of RegexIterator.
I can see no documentation for this in phpdoc, nor in the Doxygen at
http://www.php.net/~helly/php/ext/spl/In all the examples I've made so far,
var_dump()
-ing the RegexIterator
results in a ["replacement"]=>NULLAssigning a value to $replacement seems to have no bearing on the output.
I believe the intention was to give that property a value which could
be used with RegexIterator::REPLACE mode but that particular mode has
not yet been fully implemented. There is a related bug (
http://bugs.php.net/50579 ) that has not been assigned; I can't say
what the plan is for if/when the replacement mode will get some
attention. See also: the PHP implementation of RegexIterator (
http://svn.php.net/viewvc/php/php-src/trunk/ext/spl/internal/regexiterator.inc?view=markup
).Regards,
Richard.
--
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadlingSo, this should be documented as what?
As we don't document the future, I think this property should be
omitted from the RegexIterator documentation until such time the
property is useful.Basically, leave it as is.
Sounds fine to me.
Yes?
--
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling