diff options
author | Marcus Boerger <helly@php.net> | 2003-08-04 23:15:56 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-08-04 23:15:56 +0000 |
commit | d23bfc0512cad5f38610969bf8c3fb260f99467f (patch) | |
tree | 4ad81d07437f0a2d15bde69f2529f61bdfe3f3a5 | |
parent | 28dd8fcff288953bdde9b72731479b7fcb6902d2 (diff) | |
download | php-git-d23bfc0512cad5f38610969bf8c3fb260f99467f.tar.gz |
Update documentation in source, reflection and docu itself, part II
-rwxr-xr-x | ext/spl/spl.php | 42 | ||||
-rwxr-xr-x | ext/spl/spl_directory.c | 17 | ||||
-rwxr-xr-x | ext/spl/spl_functions.h | 4 |
3 files changed, 49 insertions, 14 deletions
diff --git a/ext/spl/spl.php b/ext/spl/spl.php index 42380bcbda..53a2d0d429 100755 --- a/ext/spl/spl.php +++ b/ext/spl/spl.php @@ -284,27 +284,57 @@ class spl_array_it implements spl_sequence_assoc { * * \param $array the array to use. */ - private function __construct($array) + private function __construct($array); /*! \copydoc spl_sequence::rewind */ - function rewind() + function rewind(); /*! \copydoc spl_forward::current */ - function current() + function current(); /*! \copydoc spl_assoc::key */ - function key() + function key(); /*! \copydoc spl_forward::next */ - function next() + function next(); /*! \copydoc spl_forward::has_more */ - function has_more() + function has_more(); } +/*! \brief Directory iterator + */ +class spl_array_it implements spl_sequence { + + /*! Construct a directory iterator from a path-string. + * + * \param $path directory to iterate. + */ + private function __construct($path); + + /*! \copydoc spl_sequence::rewind + */ + function rewind(); + + /*! \copydoc spl_forward::current + */ + function current(); + + /*! \copydoc spl_forward::next + */ + function next(); + + /*! \copydoc spl_forward::has_more + */ + function has_more(); + + /*! \return The opened path. + */ + function get_path(); +} ?>
\ No newline at end of file diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 2024ca05c5..c487cf2057 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -44,13 +44,18 @@ SPL_CLASS_FUNCTION(dir, next); SPL_CLASS_FUNCTION(dir, has_more); SPL_CLASS_FUNCTION(dir, get_path); +static +ZEND_BEGIN_ARG_INFO(arginfo_dir___construct, 0) + ZEND_ARG_INFO(0, path) +ZEND_END_ARG_INFO(); + static zend_function_entry spl_dir_class_functions[] = { - SPL_CLASS_FE(dir, __construct, NULL) - SPL_CLASS_FE(dir, rewind, NULL) - SPL_CLASS_FE(dir, current, NULL) - SPL_CLASS_FE(dir, next, NULL) - SPL_CLASS_FE(dir, has_more, NULL) - SPL_CLASS_FE(dir, get_path, NULL) + SPL_CLASS_FE(dir, __construct, arginfo_dir___construct, ZEND_ACC_PUBLIC) + SPL_CLASS_FE(dir, rewind, NULL, ZEND_ACC_PUBLIC) + SPL_CLASS_FE(dir, current, NULL, ZEND_ACC_PUBLIC) + SPL_CLASS_FE(dir, next, NULL, ZEND_ACC_PUBLIC) + SPL_CLASS_FE(dir, has_more, NULL, ZEND_ACC_PUBLIC) + SPL_CLASS_FE(dir, get_path, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h index 215345d594..1a2aa15037 100755 --- a/ext/spl/spl_functions.h +++ b/ext/spl/spl_functions.h @@ -60,10 +60,10 @@ void spl_add_interfaces(zval * list, zend_class_entry * pce TSRMLS_DC); int spl_add_classes(zend_class_entry ** ppce, zval *list TSRMLS_DC); #define SPL_CLASS_FE(class_name, function_name, arg_info, flags) \ - { #function_name, spl_ ## class_name ## _ ## function_name, arg_info, sizeof(arg_info)/sizeof(struct _zend_arg_info)-1, flags }, + PHP_ME( spl_ ## class_name, function_name, arg_info, flags) #define SPL_CLASS_FUNCTION(class_name, function_name) \ - PHP_NAMED_FUNCTION(spl_ ## class_name ## _ ## function_name) + PHP_METHOD(spl_ ## class_name, function_name) #endif /* PHP_FUNCTIONS_H */ |