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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to