>  From the technical perspective, it's actually easy to implement in a
> rock-solid manner.  Don't kill the class completely but just clean any
> functions/properties inside of it, and mark it as dead.  Then patch the
> class declaration begin code to check for this flag, and reuse the class
> structure instead of complaining about reregistering a class.  There might
> be some more cleanup necessary in PHP 5, but if any, it shouldn't be too
> complicated.
>
  I took this in a slightly different direction:
http://pecl.php.net/classkit  Any and all thoughts appreciated.

Function Entries:
    bool classkit_method_add(string classname, string methodname, string
args, string code[, long flags])
    bool classkit_method_redefine(string classname, string methodname,
string args, string code[, long flags])
            Note: flags parameter requires PHP >= 5.0.0
    bool classkit_method_remove(string classname, string methodname)
    bool classkit_method_rename(string classname, string methodname, string
newname)

Constants (passed in flags parameter):
    CLASSKIT_ACC_PUBLIC
    CLASSKIT_ACC_PROTECTED
    CLASSKIT_ACC_PRIVATE

-Sara

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

Reply via email to