Browse Source

Update documentation in source, reflection and docu itself, part II

PEAR_1_4DEV
Marcus Boerger 23 years ago
parent
commit
d23bfc0512
  1. 42
      ext/spl/spl.php
  2. 17
      ext/spl/spl_directory.c
  3. 4
      ext/spl/spl_functions.h

42
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();
}
?>

17
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}
};

4
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 */

Loading…
Cancel
Save