summaryrefslogtreecommitdiff
path: root/ext/spl/spl_functions.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-11-09 14:05:36 +0000
committerMarcus Boerger <helly@php.net>2003-11-09 14:05:36 +0000
commit159c538bcf7cc649410a7e91b11584dcebcf1b55 (patch)
tree2e5d3063aaf3733744fa81a1614fd526f9881be1 /ext/spl/spl_functions.c
parent44dc9eb3e4ae8be3d3d187b8e6335d768447fed5 (diff)
downloadphp-git-159c538bcf7cc649410a7e91b11584dcebcf1b55.tar.gz
Major update:
- Remove all overloading hooks -> array_read/array_access must be rewritten - Remove all basic iterators - Remove all 'spl_' prefixing exposed to user level - Add RecursiveIterator, RecursiveIteratorIterator - Add DirectoryIterator, DirectoryTreeIterator - Add some examples
Diffstat (limited to 'ext/spl/spl_functions.c')
-rwxr-xr-xext/spl/spl_functions.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c
index 126a6f15e3..415901d908 100755
--- a/ext/spl/spl_functions.c
+++ b/ext/spl/spl_functions.c
@@ -24,7 +24,6 @@
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_spl.h"
-#include "spl_foreach.h"
/* {{{ spl_destroy_class */
void spl_destroy_class(zend_class_entry ** ppce)
@@ -62,17 +61,24 @@ void spl_register_std_class(zend_class_entry ** ppce, char * class_name, void *
}
/* }}} */
-/* {{{ spl_register_parent_ce */
-void spl_register_parent_ce(zend_class_entry * class_entry, zend_class_entry * parent_class TSRMLS_DC)
+/* {{{ spl_register_sub_class */
+void spl_register_sub_class(zend_class_entry ** ppce, zend_class_entry * parent_ce, char * class_name, void *obj_ctor, function_entry * function_list TSRMLS_DC)
{
- class_entry->parent = parent_class;
+ zend_class_entry ce;
+
+ INIT_CLASS_ENTRY(ce, class_name, function_list);
+ ce.name_length = strlen(class_name);
+ *ppce = zend_register_internal_class_ex(&ce, parent_ce, NULL TSRMLS_CC);
+
+ /* entries changed by initialize */
+ (*ppce)->create_object = obj_ctor;
}
/* }}} */
-/* {{{ spl_register_implement */
-void spl_register_implement(zend_class_entry * class_entry, zend_class_entry * interface_entry TSRMLS_DC)
+/* {{{ spl_register_parent_ce */
+void spl_register_parent_ce(zend_class_entry * class_entry, zend_class_entry * parent_class TSRMLS_DC)
{
- zend_class_implements(class_entry TSRMLS_CC, 1, interface_entry);
+ class_entry->parent = parent_class;
}
/* }}} */