Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38283 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46572 invoked from network); 16 Jun 2008 13:25:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2008 13:25:11 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 72.14.220.156 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 72.14.220.156 fg-out-1718.google.com Received: from [72.14.220.156] ([72.14.220.156:29768] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/87-06776-3B966584 for ; Mon, 16 Jun 2008 09:25:10 -0400 Received: by fg-out-1718.google.com with SMTP id 16so3584488fgg.23 for ; Mon, 16 Jun 2008 06:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type:references; bh=YmIJCvjpfJaJ2sK0hRFvQh1C/WNPSSGHNk5VLADkAKg=; b=GqnN1W7Ynqs1EyIUboatP4x7w3ojwjJ+aWJHM3NHOMaYxxzZ4i6mZwDIvdPtfdXN/3 RsQForeCCGxpKi1N3njYddzpFkTbv12Zuihv3wRtxWQKG3fafd3Qgo3k6ziaxwSO/K89 YLyi/6wsfgBfDEtUPyWT30bTPFcuw6+0NqWPI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:references; b=vGUad2LjQpvMR/cxrzOVv9wYfyMBltQNW4OyAaT+xGj1VwsaZF07ezkg7OxmyiZLOJ I0Wj0wkmZm+1LcHiu3XnRn7Z4+I2ptHONq9dBiMQWCgHahtsvU8HyLQs86CNKUP+bUnQ Y5xFCoVi5eHLUhiMy27Qbp4PdKsrM3AIHm0o8= Received: by 10.86.65.9 with SMTP id n9mr7802051fga.76.1213622703868; Mon, 16 Jun 2008 06:25:03 -0700 (PDT) Received: by 10.86.90.12 with HTTP; Mon, 16 Jun 2008 06:25:03 -0700 (PDT) Message-ID: <10845a340806160625y45e4a74fm54a200afe8ffa320@mail.gmail.com> Date: Mon, 16 Jun 2008 14:25:03 +0100 Reply-To: RQuadling@GoogleMail.com To: "Marcus Boerger" Cc: "Lars Strojny" , internals In-Reply-To: <446994776.20080613201106@marcus-boerger.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5640_6759442.1213622703835" References: <10845a340806130738n7caa4931u2b831241d13ca40d@mail.gmail.com> <1213369434.6903.2.camel@localhost> <10845a340806130811k252cd257u3e17a6beb8816aca@mail.gmail.com> <10845a340806130812m1d5fce59ua9abb362c5a361c@mail.gmail.com> <446994776.20080613201106@marcus-boerger.de> Subject: Re: [PHP-DEV] Would there be any mileage or interest in having PHP's COM class support Reflection? From: rquadling@googlemail.com ("Richard Quadling") ------=_Part_5640_6759442.1213622703835 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/6/13 Marcus Boerger : > Hello Richard, > > well the correct solution is: ReflectionClass::export($classname) > but anyway, you found a bug, please file a report for it. > The issue is that the class is COM and ReflectionClass::export('COM') works but COM is an empty class. I want to reflect an instance of a COM class. ReflectionObject::export(new COM('....')); would be what I expect to work. It seems that the com_print_typeinfo() function provides the sort of information I am expecting. I'll raise the bug as I cannot get any reflectors to report the COM content. Richard. > 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 > > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" ------=_Part_5640_6759442.1213622703835--