Hi.
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
My initial idea was to be able to use PHP to examine COM objects.
Regards,
Richard.
--
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
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
2008/6/13 Lars Strojny lars@strojny.net:
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 1Read the error report and than take a look at the documentation:
http://de.php.net/language.oop5.reflectionThis should work:
Reflection::export(
new ReflectionObject(
new COM('CrystablReports11.ObjectFactory.1')
)
);cu, Lars
<?php
$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).
--
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
2008/6/13 Richard Quadling rquadling@googlemail.com:
2008/6/13 Lars Strojny lars@strojny.net:
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 1Read the error report and than take a look at the documentation:
http://de.php.net/language.oop5.reflectionThis should work:
Reflection::export(
new ReflectionObject(
new COM('CrystablReports11.ObjectFactory.1')
)
);cu, Lars
<?php
$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.
--
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
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 rquadling@googlemail.com:
2008/6/13 Lars Strojny lars@strojny.net:
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 1Read the error report and than take a look at the documentation:
http://de.php.net/language.oop5.reflectionThis should work:
Reflection::export(
new ReflectionObject(
new COM('CrystablReports11.ObjectFactory.1')
)
);cu, Lars
<?php
$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
2008/6/13 Marcus Boerger helly@php.net:
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 rquadling@googlemail.com:
2008/6/13 Lars Strojny lars@strojny.net:
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 1Read the error report and than take a look at the documentation:
http://de.php.net/language.oop5.reflectionThis should work:
Reflection::export(
new ReflectionObject(
new COM('CrystablReports11.ObjectFactory.1')
)
);cu, Lars
<?php
$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!"