Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:783 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17139 invoked from network); 8 Apr 2003 08:53:31 -0000 Received: from unknown (HELO hotmail.com) (64.4.36.123) by pb1.pair.com with SMTP; 8 Apr 2003 08:53:31 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 8 Apr 2003 01:53:30 -0700 Received: from 195.250.104.30 by oe19.pav2.hotmail.com with DAV; Tue, 08 Apr 2003 08:53:30 +0000 X-Originating-IP: [195.250.104.30] X-Originating-Email: [tomica00@hotmail.com] To: Date: Tue, 8 Apr 2003 10:58:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 08 Apr 2003 08:53:30.0875 (UTC) FILETIME=[5434E4B0:01C2FDAC] Subject: Re: [PHP-DEV] Reflection API RFC From: tomica00@hotmail.com ("Tomica Jovanovic") hi! > I have the first draft of PHP 5 reflection API ready. You can find it at: > > http://www.gravitonic.com/software/php/reflection.txt > > Comments and suggestions are appreciated. First of all, why isn't InterfaceType base class for ClassType, since, in fact, class _is_ an interface, and every method of InterfaceType is in fact present in the ClassType (except for the getParentInterface() which is named getParentClass in ClassType, but could easily be named getParent in both classes, or the getParentInterface() could be "non-virtual" in the InterfaceType class...) Second, why aren't some of the methods from ClassType available in the InterfaceType, when they are clearly valid there. Some of them include: class InterfaceType { // ... that suggested stuff in RFC // and my stuff below // same as ClassType::getInterfaces() // but not sure about this one.. didn't really understand if // Interface can "implement", or extend more than one // Interface... (and BTW, if they cant, they should ;) function getInterfaces(); // same as ClassType::hasInterface($name) // look the note in the previous method function hasInterface($name); // same as ClassType::getModifiers() // the RFC states "currently only ABSTRACT" which doesn't apply // to Interfaces, but might be usable later when/if more // modifiers are added function getModifiers(); // same as ClassType::isInstanceOf() // but with a slightly different meaning. it would return if $obj is // an instance of a Class that implements this Interface (and // thus, can safely be looked at as an "instance" of this Interface) function isInstanceOf($obj); // same as ClassType::invokeMethod() function invokeMethod($name, $obj, $params); } // end InterfaceType that's it for now.. - zombie - Tomica Jovanovic - tomica@mbox.co.yu * As we anarchists say: There's no government like no government.