Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:12282 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58112 invoked by uid 1010); 20 Aug 2004 20:27:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58088 invoked by uid 1007); 20 Aug 2004 20:27:21 -0000 Message-ID: <20040820202721.58087.qmail@pb1.pair.com> To: internals@lists.php.net References: <4123D1B5.3080203@caedmon.net> <20040819090436.788cd2bf.tony2001@phpclub.net> <5.1.0.14.2.20040819103812.08419700@localhost> Date: Fri, 20 Aug 2004 13:27:20 -0700 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Posted-By: 169.229.135.175 Subject: Re: [PHP-DEV] Class Destruction / Reloading From: pollita@php.net ("Sara Golemon") > 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