Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98652 invoked by uid 1010); 13 Jan 2004 22:59:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 98627 invoked from network); 13 Jan 2004 22:59:56 -0000 Received: from unknown (HELO mail.a-s-i.com) (208.42.143.194) by pb1.pair.com with SMTP; 13 Jan 2004 22:59:56 -0000 Received: from romulus.a-s-i.com (localhost [127.0.0.1]) by mail.a-s-i.com (8.12.10/8.12.8) with ESMTP id i0DMxuOJ002173 for ; Tue, 13 Jan 2004 16:59:56 -0600 Received: (from glamm@localhost) by romulus.a-s-i.com (8.12.10/8.12.8/Submit) id i0DMxucS002172 for internals@lists.php.net; Tue, 13 Jan 2004 16:59:56 -0600 X-Authentication-Warning: romulus.a-s-i.com: glamm set sender to glamm@a-s-i.com using -f Date: Tue, 13 Jan 2004 16:59:56 -0600 To: internals@lists.php.net Message-ID: <20040113225956.GA2008@romulus.a-s-i.com> Mail-Followup-To: Bob Glamm , internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: ZE2/PHP5 API re: extension questions From: glamm@a-s-i.com (Bob Glamm) I'm looking to update the libical extension I wrote awhile back to use the new features of ZE2 in PHP5 (libical has been written in such a manner that the features of ZE2 are an excellent match to libical's interface). I've been looking over the default exception class in Zend/zend_default_classess.c, and it looks to be a good starting point for what I'd like to do. So, the questions: 1) Using the __ function features (specifically I'm interested in __clone(), __construct(), __destruct(), and __toString()) seems to just mean adding the appropriate entries to the zend_function_entry structure for the class. I notice that when the class is registered, the handlers.clone_obj entry is set to NULL. Am I safe in assuming that setting an entry to NULL in the handlers struct implies using the named function in the zend_function_entry list? (I think the above only applies to __clone(), __get(), and __set()?) 2) Private/protected internal class methods can be defined using the ZEND_ME macro with the flags set to ZEND_ACC_PRIVATE or ZEND_ACC_PROTECTED as appropriate? Also, static class methods can be defined also using ZEND_ME with ZEND_ACC_STATIC as the flags parameter? I guess I only have one class where an internal private/protected class method would be useful, but there are several classes that could benefit from static class methods. 3) Per-class constants: Almost every class in the libical extension can use per-class constants, but I don't see the code for that in the Zend API. Do I need to dig a bit deeper (pointers to appropriate Zend headers/files appreciated :) or is there a specific set of functions that doesn't have an API yet that I should be using? Any help would be appreciated. Thanks! -Bob