cvs: php-src(PHP_5_1) /ext/spl spl_directory.c spl_iterators.c spl_sxe.c
| From: | Marcus Boerger | Date: | Mon, 06 Mar 2006 09:50:44 +0000 |
| Subject: | cvs: php-src(PHP_5_1) /ext/spl spl_directory.c spl_iterators.c spl_sxe.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-37139@lists.php.net to get a copy of this message | ||
helly Mon Mar 6 09:50:44 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/ext/spl spl_directory.c spl_iterators.c spl_sxe.c
Log:
- MFH Proto fixes
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.22&r2=1.45.2.23&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.22 php-src/ext/spl/spl_directory.c:1.45.2.23 --- php-src/ext/spl/spl_directory.c:1.45.2.22 Sun Mar 5 17:39:49 2006 +++ php-src/ext/spl/spl_directory.c Mon Mar 6 09:50:44 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.45.2.22 2006/03/05 17:39:49 helly Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.23 2006/03/06 09:50:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -741,7 +741,7 @@ } /* }}} */ -/* {{{ proto SplFileObject SplFileInfo::setFileClass([string class_name]) +/* {{{ proto void SplFileInfo::setFileClass([string class_name]) Class to use in openFile() */ SPL_METHOD(SplFileInfo, setFileClass) { @@ -758,7 +758,7 @@ } /* }}} */ -/* {{{ proto SplFileObject SplFileInfo::setInfoClass([string class_name]) +/* {{{ proto void SplFileInfo::setInfoClass([string class_name]) Class to use in getFileInfo(), getPathInfo() */ SPL_METHOD(SplFileInfo, setInfoClass) { http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.23&r2=1.73.2.24&diff_format=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.73.2.23 php-src/ext/spl/spl_iterators.c:1.73.2.24 --- php-src/ext/spl/spl_iterators.c:1.73.2.23 Sun Mar 5 17:39:49 2006 +++ php-src/ext/spl/spl_iterators.c Mon Mar 6 09:50:44 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c,v 1.73.2.23 2006/03/05 17:39:49 helly Exp $ */ +/* $Id: spl_iterators.c,v 1.73.2.24 2006/03/06 09:50:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -359,7 +359,7 @@ spl_recursive_it_rewind }; -/* {{{ proto RecursiveIteratorIterator::__construct(RecursiveIterator|IteratorAggregate it [, int mode = RIT_LEAVES_ONLY [, int flags = 0]]) throws InvalidArgumentException +/* {{{ proto void RecursiveIteratorIterator::__construct(RecursiveIterator|IteratorAggregate it [, int mode = RIT_LEAVES_ONLY [, int flags = 0]]) throws InvalidArgumentException Creates a RecursiveIteratorIterator from a RecursiveIterator. */ SPL_METHOD(RecursiveIteratorIterator, __construct) { @@ -448,7 +448,7 @@ spl_recursive_it_rewind_ex(object, getThis() TSRMLS_CC); } /* }}} */ -/* {{{ proto bolean RecursiveIteratorIterator::valid() +/* {{{ proto bool RecursiveIteratorIterator::valid() Check whether the current position is valid */ SPL_METHOD(RecursiveIteratorIterator, valid) { @@ -584,28 +584,28 @@ } } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::beginChildren() +/* {{{ proto void RecursiveIteratorIterator::beginChildren() Called when recursing one level down */ SPL_METHOD(RecursiveIteratorIterator, beginChildren) { /* nothing to do */ } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::endChildren() +/* {{{ proto void RecursiveIteratorIterator::endChildren() Called when end recursing one level */ SPL_METHOD(RecursiveIteratorIterator, endChildren) { /* nothing to do */ } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::nextElement() +/* {{{ proto void RecursiveIteratorIterator::nextElement() Called when the next element is available */ SPL_METHOD(RecursiveIteratorIterator, nextElement) { /* nothing to do */ } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::setMaxDepth([$max_depth = -1]) +/* {{{ proto void RecursiveIteratorIterator::setMaxDepth([$max_depth = -1]) Set the maximum allowed depth (or any depth if pmax_depth = -1] */ SPL_METHOD(RecursiveIteratorIterator, setMaxDepth) { @@ -622,7 +622,7 @@ object->max_depth = max_depth; } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::getMaxDepth() +/* {{{ proto int|false RecursiveIteratorIterator::getMaxDepth() Return the maximum accepted depth or false if any depth is allowed */ SPL_METHOD(RecursiveIteratorIterator, getMaxDepth) { @@ -943,7 +943,7 @@ return intern; } -/* {{{ proto FilterIterator::__construct(Iterator it) +/* {{{ proto void FilterIterator::__construct(Iterator it) Create an Iterator from another iterator */ SPL_METHOD(FilterIterator, __construct) { @@ -1059,10 +1059,10 @@ spl_dual_it_fetch(intern, 1 TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean FilterIterator::valid() - proto boolean ParentIterator::valid() - proto boolean IteratorIterator::valid() - proto boolean NoRewindIterator::valid() +/* {{{ proto bool FilterIterator::valid() + proto bool ParentIterator::valid() + proto bool IteratorIterator::valid() + proto bool NoRewindIterator::valid() Check whether the current element is valid */ SPL_METHOD(dual_it, valid) { @@ -1183,14 +1183,14 @@ spl_filter_it_next(getThis(), intern TSRMLS_CC); } /* }}} */ -/* {{{ proto RecursiveFilterIterator::__construct(RecursiveIterator it) +/* {{{ proto void RecursiveFilterIterator::__construct(RecursiveIterator it) Create a RecursiveFilterIterator from a RecursiveIterator */ SPL_METHOD(RecursiveFilterIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveFilterIterator, spl_ce_RecursiveIterator, DIT_RecursiveFilterIterator); } /* }}} */ -/* {{{ proto boolean RecursiveFilterIterator::hasChildren() +/* {{{ proto bool RecursiveFilterIterator::hasChildren() Check whether the inner iterator's current element has children */ SPL_METHOD(RecursiveFilterIterator, hasChildren) { @@ -1217,14 +1217,14 @@ zval_ptr_dtor(&retval); } /* }}} */ -/* {{{ proto ParentIterator::__construct(RecursiveIterator it) +/* {{{ proto void ParentIterator::__construct(RecursiveIterator it) Create a ParentIterator from a RecursiveIterator */ SPL_METHOD(ParentIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_ParentIterator, spl_ce_RecursiveIterator, DIT_ParentIterator); } /* }}} */ -/* {{{ proto boolean ParentIterator::hasChildren() +/* {{{ proto bool ParentIterator::hasChildren() Check whether the inner iterator's current element has children */ SPL_METHOD(ParentIterator, hasChildren) { @@ -1405,7 +1405,7 @@ spl_limit_it_seek(intern, intern->u.limit.offset TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean LimitIterator::valid() +/* {{{ proto bool LimitIterator::valid() Check whether the current element is valid */ SPL_METHOD(LimitIterator, valid) { @@ -1579,7 +1579,7 @@ spl_caching_it_next(intern TSRMLS_CC); } -/* {{{ proto CachingIterator::__construct(Iterator it [, flags = CIT_CALL_TOSTRING]) +/* {{{ proto void CachingIterator::__construct(Iterator it [, flags = CIT_CALL_TOSTRING]) Construct a CachingIterator from an Iterator */ SPL_METHOD(CachingIterator, __construct) { @@ -1597,7 +1597,7 @@ spl_caching_it_rewind(intern TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean CachingIterator::valid() +/* {{{ proto bool CachingIterator::valid() Check whether the current element is valid */ SPL_METHOD(CachingIterator, valid) { @@ -1619,7 +1619,7 @@ spl_caching_it_next(intern TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean CachingIterator::hasNext() +/* {{{ proto bool CachingIterator::hasNext() Check whether the inner iterator has a valid next element */ SPL_METHOD(CachingIterator, hasNext) { @@ -1680,14 +1680,14 @@ {NULL, NULL, NULL} }; -/* {{{ proto RecursiveCachingIterator::__construct(RecursiveIterator it [, flags = CIT_CALL_TOSTRING]) +/* {{{ proto void RecursiveCachingIterator::__construct(RecursiveIterator it [, flags = CIT_CALL_TOSTRING]) Create an iterator from a RecursiveIterator */ SPL_METHOD(RecursiveCachingIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveCachingIterator, spl_ce_RecursiveIterator, DIT_RecursiveCachingIterator); } /* }}} */ -/* {{{ proto bolean RecursiveCachingIterator::hasChildren() +/* {{{ proto bool RecursiveCachingIterator::hasChildren() Check whether the current element of the inner iterator has children */ SPL_METHOD(RecursiveCachingIterator, hasChildren) { @@ -1726,7 +1726,7 @@ {NULL, NULL, NULL} }; -/* {{{ proto IteratorIterator::__construct(Traversable it) +/* {{{ proto void IteratorIterator::__construct(Traversable it) Create an iterator from anything that is traversable */ SPL_METHOD(IteratorIterator, __construct) { @@ -1749,7 +1749,7 @@ {NULL, NULL, NULL} }; -/* {{{ proto NoRewindIterator::__construct(Iterator it) +/* {{{ proto void NoRewindIterator::__construct(Iterator it) Create an iterator from another iterator */ SPL_METHOD(NoRewindIterator, __construct) { @@ -1763,7 +1763,7 @@ /* nothing to do */ } /* }}} */ -/* {{{ proto void NoRewindIterator::valid() +/* {{{ proto bool NoRewindIterator::valid() Return inner iterators valid() */ SPL_METHOD(NoRewindIterator, valid) { @@ -1833,14 +1833,14 @@ {NULL, NULL, NULL} }; -/* {{{ proto InfiniteIterator::__construct(Iterator it) +/* {{{ proto void InfiniteIterator::__construct(Iterator it) Create an iterator from another iterator */ SPL_METHOD(InfiniteIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_InfiniteIterator, zend_ce_iterator, DIT_InfiniteIterator); } /* }}} */ -/* {{{ proto InfiniteIterator::next() +/* {{{ proto void InfiniteIterator::next() Prevent a call to inner iterators rewind() (internally the current data will be fetched if valid()) */ SPL_METHOD(InfiniteIterator, next) { @@ -1865,34 +1865,34 @@ {NULL, NULL, NULL} }; -/* {{{ proto EmptyIterator::rewind() +/* {{{ proto void EmptyIterator::rewind() Does nothing */ SPL_METHOD(EmptyIterator, rewind) { } /* }}} */ -/* {{{ proto EmptyIterator::valid() +/* {{{ proto false EmptyIterator::valid() Return false */ SPL_METHOD(EmptyIterator, valid) { RETURN_FALSE; } /* }}} */ -/* {{{ proto EmptyIterator::key() - Throws exception */ +/* {{{ proto void EmptyIterator::key() + Throws exception BadMethodCallException */ SPL_METHOD(EmptyIterator, key) { zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the key of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ -/* {{{ proto EmptyIterator::current() - Throws exception */ +/* {{{ proto void EmptyIterator::current() + Throws exception BadMethodCallException */ SPL_METHOD(EmptyIterator, current) { zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the value of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ -/* {{{ proto EmptyIterator::next() +/* {{{ proto void EmptyIterator::next() Does nothing */ SPL_METHOD(EmptyIterator, next) { @@ -1956,7 +1956,7 @@ spl_append_it_fetch(intern TSRMLS_CC); } /* }}} */ -/* {{{ proto AppendIterator::__construct() +/* {{{ proto void AppendIterator::__construct() Create an AppendIterator */ SPL_METHOD(AppendIterator, __construct) { @@ -2004,7 +2004,7 @@ } } /* }}} */ -/* {{{ proto boolean AppendIterator::valid() +/* {{{ proto bool AppendIterator::valid() Check if the current state is valid */ SPL_METHOD(AppendIterator, valid) { @@ -2015,7 +2015,7 @@ RETURN_BOOL(intern->current.data); } /* }}} */ -/* {{{ proto AppendIterator::next() +/* {{{ proto void AppendIterator::next() Forward to next element */ SPL_METHOD(AppendIterator, next) { http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_sxe.c?r1=1.8.2.4&r2=1.8.2.5&diff_format=u Index: php-src/ext/spl/spl_sxe.c diff -u php-src/ext/spl/spl_sxe.c:1.8.2.4 php-src/ext/spl/spl_sxe.c:1.8.2.5 --- php-src/ext/spl/spl_sxe.c:1.8.2.4 Sun Mar 5 17:39:49 2006 +++ php-src/ext/spl/spl_sxe.c Mon Mar 6 09:50:44 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_sxe.c,v 1.8.2.4 2006/03/05 17:39:49 helly Exp $ */ +/* $Id: spl_sxe.c,v 1.8.2.5 2006/03/06 09:50:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -41,7 +41,9 @@ #include "ext/simplexml/php_simplexml_exports.h" -SPL_METHOD(SimpleXMLIterator, rewind) /* {{{ */ +/* {{{ proto void SimpleXMLIterator::rewind() + Rewind to first element */ +SPL_METHOD(SimpleXMLIterator, rewind) { php_sxe_iterator iter; @@ -50,7 +52,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, valid) /* {{{ */ +/* {{{ proto bool SimpleXMLIterator::valid() + Check whether iteration is valid */ +SPL_METHOD(SimpleXMLIterator, valid) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -58,7 +62,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, current) /* {{{ */ +/* {{{ proto SimpleXMLIterator SimpleXMLIterator::current() + Get current element */ +SPL_METHOD(SimpleXMLIterator, current) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -70,7 +76,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, key) /* {{{ */ +/* {{{ proto string SimpleXMLIterator::key() + Get name of current child element */ +SPL_METHOD(SimpleXMLIterator, key) { xmlNodePtr curnode; php_sxe_object *intern; @@ -90,7 +98,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, next) /* {{{ */ +/* {{{ proto void SimpleXMLIterator::next() + Move to next element */ +SPL_METHOD(SimpleXMLIterator, next) { php_sxe_iterator iter; @@ -99,8 +109,8 @@ } /* }}} */ -/* {{{ hasChildren() - */ +/* {{{ proto bool SimpleXMLIterator::hasChildren() + Check whether element has children (elements) */ SPL_METHOD(SimpleXMLIterator, hasChildren) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -123,8 +133,8 @@ } /* }}} */ -/* {{{ getChildren() - */ +/* {{{ proto SimpleXMLIterator SimpleXMLIterator::getChildren() + Get child element iterator */ SPL_METHOD(SimpleXMLIterator, getChildren) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -136,7 +146,9 @@ return_value->value.obj = zend_objects_store_clone_obj(sxe->iter.data TSRMLS_CC); } -SPL_METHOD(SimpleXMLIterator, count) /* {{{ */ +/* {{{ proto int SimpleXMLIterator::count() + Get number of child elements */ +SPL_METHOD(SimpleXMLIterator, count) { long count = 0;
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.45.2.22&r2=1.45.2.23&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.45.2.22 php-src/ext/spl/spl_directory.c:1.45.2.23 --- php-src/ext/spl/spl_directory.c:1.45.2.22 Sun Mar 5 17:39:49 2006 +++ php-src/ext/spl/spl_directory.c Mon Mar 6 09:50:44 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.45.2.22 2006/03/05 17:39:49 helly Exp $ */ +/* $Id: spl_directory.c,v 1.45.2.23 2006/03/06 09:50:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -741,7 +741,7 @@ } /* }}} */ -/* {{{ proto SplFileObject SplFileInfo::setFileClass([string class_name]) +/* {{{ proto void SplFileInfo::setFileClass([string class_name]) Class to use in openFile() */ SPL_METHOD(SplFileInfo, setFileClass) { @@ -758,7 +758,7 @@ } /* }}} */ -/* {{{ proto SplFileObject SplFileInfo::setInfoClass([string class_name]) +/* {{{ proto void SplFileInfo::setInfoClass([string class_name]) Class to use in getFileInfo(), getPathInfo() */ SPL_METHOD(SplFileInfo, setInfoClass) { http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.23&r2=1.73.2.24&diff_format=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.73.2.23 php-src/ext/spl/spl_iterators.c:1.73.2.24 --- php-src/ext/spl/spl_iterators.c:1.73.2.23 Sun Mar 5 17:39:49 2006 +++ php-src/ext/spl/spl_iterators.c Mon Mar 6 09:50:44 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c,v 1.73.2.23 2006/03/05 17:39:49 helly Exp $ */ +/* $Id: spl_iterators.c,v 1.73.2.24 2006/03/06 09:50:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -359,7 +359,7 @@ spl_recursive_it_rewind }; -/* {{{ proto RecursiveIteratorIterator::__construct(RecursiveIterator|IteratorAggregate it [, int mode = RIT_LEAVES_ONLY [, int flags = 0]]) throws InvalidArgumentException +/* {{{ proto void RecursiveIteratorIterator::__construct(RecursiveIterator|IteratorAggregate it [, int mode = RIT_LEAVES_ONLY [, int flags = 0]]) throws InvalidArgumentException Creates a RecursiveIteratorIterator from a RecursiveIterator. */ SPL_METHOD(RecursiveIteratorIterator, __construct) { @@ -448,7 +448,7 @@ spl_recursive_it_rewind_ex(object, getThis() TSRMLS_CC); } /* }}} */ -/* {{{ proto bolean RecursiveIteratorIterator::valid() +/* {{{ proto bool RecursiveIteratorIterator::valid() Check whether the current position is valid */ SPL_METHOD(RecursiveIteratorIterator, valid) { @@ -584,28 +584,28 @@ } } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::beginChildren() +/* {{{ proto void RecursiveIteratorIterator::beginChildren() Called when recursing one level down */ SPL_METHOD(RecursiveIteratorIterator, beginChildren) { /* nothing to do */ } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::endChildren() +/* {{{ proto void RecursiveIteratorIterator::endChildren() Called when end recursing one level */ SPL_METHOD(RecursiveIteratorIterator, endChildren) { /* nothing to do */ } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::nextElement() +/* {{{ proto void RecursiveIteratorIterator::nextElement() Called when the next element is available */ SPL_METHOD(RecursiveIteratorIterator, nextElement) { /* nothing to do */ } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::setMaxDepth([$max_depth = -1]) +/* {{{ proto void RecursiveIteratorIterator::setMaxDepth([$max_depth = -1]) Set the maximum allowed depth (or any depth if pmax_depth = -1] */ SPL_METHOD(RecursiveIteratorIterator, setMaxDepth) { @@ -622,7 +622,7 @@ object->max_depth = max_depth; } /* }}} */ -/* {{{ proto RecursiveIterator RecursiveIteratorIterator::getMaxDepth() +/* {{{ proto int|false RecursiveIteratorIterator::getMaxDepth() Return the maximum accepted depth or false if any depth is allowed */ SPL_METHOD(RecursiveIteratorIterator, getMaxDepth) { @@ -943,7 +943,7 @@ return intern; } -/* {{{ proto FilterIterator::__construct(Iterator it) +/* {{{ proto void FilterIterator::__construct(Iterator it) Create an Iterator from another iterator */ SPL_METHOD(FilterIterator, __construct) { @@ -1059,10 +1059,10 @@ spl_dual_it_fetch(intern, 1 TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean FilterIterator::valid() - proto boolean ParentIterator::valid() - proto boolean IteratorIterator::valid() - proto boolean NoRewindIterator::valid() +/* {{{ proto bool FilterIterator::valid() + proto bool ParentIterator::valid() + proto bool IteratorIterator::valid() + proto bool NoRewindIterator::valid() Check whether the current element is valid */ SPL_METHOD(dual_it, valid) { @@ -1183,14 +1183,14 @@ spl_filter_it_next(getThis(), intern TSRMLS_CC); } /* }}} */ -/* {{{ proto RecursiveFilterIterator::__construct(RecursiveIterator it) +/* {{{ proto void RecursiveFilterIterator::__construct(RecursiveIterator it) Create a RecursiveFilterIterator from a RecursiveIterator */ SPL_METHOD(RecursiveFilterIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveFilterIterator, spl_ce_RecursiveIterator, DIT_RecursiveFilterIterator); } /* }}} */ -/* {{{ proto boolean RecursiveFilterIterator::hasChildren() +/* {{{ proto bool RecursiveFilterIterator::hasChildren() Check whether the inner iterator's current element has children */ SPL_METHOD(RecursiveFilterIterator, hasChildren) { @@ -1217,14 +1217,14 @@ zval_ptr_dtor(&retval); } /* }}} */ -/* {{{ proto ParentIterator::__construct(RecursiveIterator it) +/* {{{ proto void ParentIterator::__construct(RecursiveIterator it) Create a ParentIterator from a RecursiveIterator */ SPL_METHOD(ParentIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_ParentIterator, spl_ce_RecursiveIterator, DIT_ParentIterator); } /* }}} */ -/* {{{ proto boolean ParentIterator::hasChildren() +/* {{{ proto bool ParentIterator::hasChildren() Check whether the inner iterator's current element has children */ SPL_METHOD(ParentIterator, hasChildren) { @@ -1405,7 +1405,7 @@ spl_limit_it_seek(intern, intern->u.limit.offset TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean LimitIterator::valid() +/* {{{ proto bool LimitIterator::valid() Check whether the current element is valid */ SPL_METHOD(LimitIterator, valid) { @@ -1579,7 +1579,7 @@ spl_caching_it_next(intern TSRMLS_CC); } -/* {{{ proto CachingIterator::__construct(Iterator it [, flags = CIT_CALL_TOSTRING]) +/* {{{ proto void CachingIterator::__construct(Iterator it [, flags = CIT_CALL_TOSTRING]) Construct a CachingIterator from an Iterator */ SPL_METHOD(CachingIterator, __construct) { @@ -1597,7 +1597,7 @@ spl_caching_it_rewind(intern TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean CachingIterator::valid() +/* {{{ proto bool CachingIterator::valid() Check whether the current element is valid */ SPL_METHOD(CachingIterator, valid) { @@ -1619,7 +1619,7 @@ spl_caching_it_next(intern TSRMLS_CC); } /* }}} */ -/* {{{ proto boolean CachingIterator::hasNext() +/* {{{ proto bool CachingIterator::hasNext() Check whether the inner iterator has a valid next element */ SPL_METHOD(CachingIterator, hasNext) { @@ -1680,14 +1680,14 @@ {NULL, NULL, NULL} }; -/* {{{ proto RecursiveCachingIterator::__construct(RecursiveIterator it [, flags = CIT_CALL_TOSTRING]) +/* {{{ proto void RecursiveCachingIterator::__construct(RecursiveIterator it [, flags = CIT_CALL_TOSTRING]) Create an iterator from a RecursiveIterator */ SPL_METHOD(RecursiveCachingIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveCachingIterator, spl_ce_RecursiveIterator, DIT_RecursiveCachingIterator); } /* }}} */ -/* {{{ proto bolean RecursiveCachingIterator::hasChildren() +/* {{{ proto bool RecursiveCachingIterator::hasChildren() Check whether the current element of the inner iterator has children */ SPL_METHOD(RecursiveCachingIterator, hasChildren) { @@ -1726,7 +1726,7 @@ {NULL, NULL, NULL} }; -/* {{{ proto IteratorIterator::__construct(Traversable it) +/* {{{ proto void IteratorIterator::__construct(Traversable it) Create an iterator from anything that is traversable */ SPL_METHOD(IteratorIterator, __construct) { @@ -1749,7 +1749,7 @@ {NULL, NULL, NULL} }; -/* {{{ proto NoRewindIterator::__construct(Iterator it) +/* {{{ proto void NoRewindIterator::__construct(Iterator it) Create an iterator from another iterator */ SPL_METHOD(NoRewindIterator, __construct) { @@ -1763,7 +1763,7 @@ /* nothing to do */ } /* }}} */ -/* {{{ proto void NoRewindIterator::valid() +/* {{{ proto bool NoRewindIterator::valid() Return inner iterators valid() */ SPL_METHOD(NoRewindIterator, valid) { @@ -1833,14 +1833,14 @@ {NULL, NULL, NULL} }; -/* {{{ proto InfiniteIterator::__construct(Iterator it) +/* {{{ proto void InfiniteIterator::__construct(Iterator it) Create an iterator from another iterator */ SPL_METHOD(InfiniteIterator, __construct) { spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_InfiniteIterator, zend_ce_iterator, DIT_InfiniteIterator); } /* }}} */ -/* {{{ proto InfiniteIterator::next() +/* {{{ proto void InfiniteIterator::next() Prevent a call to inner iterators rewind() (internally the current data will be fetched if valid()) */ SPL_METHOD(InfiniteIterator, next) { @@ -1865,34 +1865,34 @@ {NULL, NULL, NULL} }; -/* {{{ proto EmptyIterator::rewind() +/* {{{ proto void EmptyIterator::rewind() Does nothing */ SPL_METHOD(EmptyIterator, rewind) { } /* }}} */ -/* {{{ proto EmptyIterator::valid() +/* {{{ proto false EmptyIterator::valid() Return false */ SPL_METHOD(EmptyIterator, valid) { RETURN_FALSE; } /* }}} */ -/* {{{ proto EmptyIterator::key() - Throws exception */ +/* {{{ proto void EmptyIterator::key() + Throws exception BadMethodCallException */ SPL_METHOD(EmptyIterator, key) { zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the key of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ -/* {{{ proto EmptyIterator::current() - Throws exception */ +/* {{{ proto void EmptyIterator::current() + Throws exception BadMethodCallException */ SPL_METHOD(EmptyIterator, current) { zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the value of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ -/* {{{ proto EmptyIterator::next() +/* {{{ proto void EmptyIterator::next() Does nothing */ SPL_METHOD(EmptyIterator, next) { @@ -1956,7 +1956,7 @@ spl_append_it_fetch(intern TSRMLS_CC); } /* }}} */ -/* {{{ proto AppendIterator::__construct() +/* {{{ proto void AppendIterator::__construct() Create an AppendIterator */ SPL_METHOD(AppendIterator, __construct) { @@ -2004,7 +2004,7 @@ } } /* }}} */ -/* {{{ proto boolean AppendIterator::valid() +/* {{{ proto bool AppendIterator::valid() Check if the current state is valid */ SPL_METHOD(AppendIterator, valid) { @@ -2015,7 +2015,7 @@ RETURN_BOOL(intern->current.data); } /* }}} */ -/* {{{ proto AppendIterator::next() +/* {{{ proto void AppendIterator::next() Forward to next element */ SPL_METHOD(AppendIterator, next) { http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_sxe.c?r1=1.8.2.4&r2=1.8.2.5&diff_format=u Index: php-src/ext/spl/spl_sxe.c diff -u php-src/ext/spl/spl_sxe.c:1.8.2.4 php-src/ext/spl/spl_sxe.c:1.8.2.5 --- php-src/ext/spl/spl_sxe.c:1.8.2.4 Sun Mar 5 17:39:49 2006 +++ php-src/ext/spl/spl_sxe.c Mon Mar 6 09:50:44 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_sxe.c,v 1.8.2.4 2006/03/05 17:39:49 helly Exp $ */ +/* $Id: spl_sxe.c,v 1.8.2.5 2006/03/06 09:50:44 helly Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -41,7 +41,9 @@ #include "ext/simplexml/php_simplexml_exports.h" -SPL_METHOD(SimpleXMLIterator, rewind) /* {{{ */ +/* {{{ proto void SimpleXMLIterator::rewind() + Rewind to first element */ +SPL_METHOD(SimpleXMLIterator, rewind) { php_sxe_iterator iter; @@ -50,7 +52,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, valid) /* {{{ */ +/* {{{ proto bool SimpleXMLIterator::valid() + Check whether iteration is valid */ +SPL_METHOD(SimpleXMLIterator, valid) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -58,7 +62,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, current) /* {{{ */ +/* {{{ proto SimpleXMLIterator SimpleXMLIterator::current() + Get current element */ +SPL_METHOD(SimpleXMLIterator, current) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -70,7 +76,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, key) /* {{{ */ +/* {{{ proto string SimpleXMLIterator::key() + Get name of current child element */ +SPL_METHOD(SimpleXMLIterator, key) { xmlNodePtr curnode; php_sxe_object *intern; @@ -90,7 +98,9 @@ } /* }}} */ -SPL_METHOD(SimpleXMLIterator, next) /* {{{ */ +/* {{{ proto void SimpleXMLIterator::next() + Move to next element */ +SPL_METHOD(SimpleXMLIterator, next) { php_sxe_iterator iter; @@ -99,8 +109,8 @@ } /* }}} */ -/* {{{ hasChildren() - */ +/* {{{ proto bool SimpleXMLIterator::hasChildren() + Check whether element has children (elements) */ SPL_METHOD(SimpleXMLIterator, hasChildren) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -123,8 +133,8 @@ } /* }}} */ -/* {{{ getChildren() - */ +/* {{{ proto SimpleXMLIterator SimpleXMLIterator::getChildren() + Get child element iterator */ SPL_METHOD(SimpleXMLIterator, getChildren) { php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); @@ -136,7 +146,9 @@ return_value->value.obj = zend_objects_store_clone_obj(sxe->iter.data TSRMLS_CC); } -SPL_METHOD(SimpleXMLIterator, count) /* {{{ */ +/* {{{ proto int SimpleXMLIterator::count() + Get number of child elements */ +SPL_METHOD(SimpleXMLIterator, count) { long count = 0;