helly           Mon Aug  4 19:15:56 2003 EDT

  Modified files:              
    /spl        spl.php spl_directory.c spl_functions.h 
  Log:
  Update documentation in source, reflection and docu itself, part II
  
Index: spl/spl.php
diff -u spl/spl.php:1.7 spl/spl.php:1.8
--- spl/spl.php:1.7     Mon Aug  4 19:00:57 2003
+++ spl/spl.php Mon Aug  4 19:15:55 2003
@@ -284,27 +284,57 @@
         *
         * \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();    
+}
 ?>
Index: spl/spl_directory.c
diff -u spl/spl_directory.c:1.4 spl/spl_directory.c:1.5
--- spl/spl_directory.c:1.4     Sat Jul 19 15:04:35 2003
+++ spl/spl_directory.c Mon Aug  4 19:15:56 2003
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: spl_directory.c,v 1.4 2003/07/19 19:04:35 helly Exp $ */
+/* $Id: spl_directory.c,v 1.5 2003/08/04 23:15:56 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -44,13 +44,18 @@
 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}
 };
 
Index: spl/spl_functions.h
diff -u spl/spl_functions.h:1.8 spl/spl_functions.h:1.9
--- spl/spl_functions.h:1.8     Mon Aug  4 19:00:57 2003
+++ spl/spl_functions.h Mon Aug  4 19:15:56 2003
@@ -60,10 +60,10 @@
 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 */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to