Registering multi classes in one PHP extension

From: Date: Tue, 13 May 2003 15:48:23 +0000
Subject: Registering multi classes in one PHP extension
Groups: php.general 
Request: Send a blank email to php-general+get-147456@lists.php.net to get a copy of this message
Hi. Any manual about registering multi classes in one PHP extension? Simple example:(register two classes named myapp and mylib) INIT_CLASS_ENTRY(myapp_class, "myapp", myapp_class_functions); myapp_ptr = zend_register_internal_class(&myapp_class TSRMLS_CC); INIT_CLASS_ENTRY(mylib_class, "mylib", mylib_class_functions); mylib_ptr = zend_register_internal_class(&mylib_class TSRMLS_CC); Now I want write the code in php like following: <?php ... $myapp = new myapp(); $myapp->mylib->dosomething(); ... ?> The member mylib of myapp is registered in C code, also is an object by mylib class. How to do? I read some code in ext/(like pear) that contaings that function, but I can hardly understand that code. Any manual or tutorial about that topic? Thanks.

« previous php.general (#147456) next »