Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38206 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11005 invoked from network); 13 Jun 2008 18:11:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jun 2008 18:11:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:32832] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/E1-15165-C38B2584 for ; Fri, 13 Jun 2008 14:11:10 -0400 Received: from MBOERGER-ZRH.corp.google.com (p50864DEA.dip.t-dialin.net [80.134.77.234]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id BA13511F72B; Fri, 13 Jun 2008 20:11:05 +0200 (CEST) Date: Fri, 13 Jun 2008 20:11:06 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <446994776.20080613201106@marcus-boerger.de> To: "Richard Quadling" CC: "Lars Strojny" , internals In-Reply-To: <10845a340806130812m1d5fce59ua9abb362c5a361c@mail.gmail.com> References: <10845a340806130738n7caa4931u2b831241d13ca40d@mail.gmail.com> <1213369434.6903.2.camel@localhost> <10845a340806130811k252cd257u3e17a6beb8816aca@mail.gmail.com> <10845a340806130812m1d5fce59ua9abb362c5a361c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Would there be any mileage or interest in having PHP's COM class support Reflection? From: helly@php.net (Marcus Boerger) Hello Richard, well the correct solution is: ReflectionClass::export($classname) but anyway, you found a bug, please file a report for it. marcus Friday, June 13, 2008, 5:12:09 PM, you wrote: > 2008/6/13 Richard Quadling : >> >> >> 2008/6/13 Lars Strojny : >> >> Hi Richard, >>> >>> Am Freitag, den 13.06.2008, 15:38 +0100 schrieb Richard Quadling: >>> > >>> > Out of interest, I tried the following line of userland PHP ... >>> > >>> > php -n -r "Reflection::export(new >>> > COM('CrystalReports11.ObjectFactory.1'));" >>> > >>> > The error reported is ... >>> > >>> > Catchable fatal error: Argument 1 passed to Reflection::export() must >>> > implement interface Reflector, instance of com given in Command line >>> > code on >>> > line 1 >>> >>> Read the error report and than take a look at the documentation: >>> http://de.php.net/language.oop5.reflection >>> >>> This should work: >>> Reflection::export( >>> new ReflectionObject( >>> new COM('CrystablReports11.ObjectFactory.1') >>> ) >>> ); >>> >>> cu, Lars >>> >> >> > $o_CrObjectFactory = New COM("CrystalReports11.ObjectFactory.1"); >> >> Reflection::export(new ReflectionObject($o_CrObjectFactory)); >> ?> >> >> and that gets a crash. MS's Dr.Watson kicks in. >> >> I'm certainly not expecting COM objects to support reflection natively >> (that's most likely the cause of the crash). > I should have said "I'm certainly not expecting COM objects to support > reflection natively at the moment". > It would be nice if ... that's all. Best regards, Marcus