ID:               28114
 Updated by:       [EMAIL PROTECTED]
 Reported By:      adam at trachtenberg dot com
-Status:           Assigned
+Status:           Wont fix
 Bug Type:         Zend Engine 2 problem
 Operating System: *
 PHP Version:      5CVS-2005-01-10
 Assigned To:      helly
 New Comment:

It is impossible to get the values of the default parameters.

Getting the types for the parameters depends on the developers of the
classes. The classes i did should all have that information.

For the rest i set the report to won't fix because i don't suppose you
can convince the developers to add that information. Or you do it
yourself :-)


Previous Comments:
------------------------------------------------------------------------

[2005-01-10 18:08:28] adam at trachtenberg dot com

Yes. For example:

php -r 'ReflectionClass::export(ReflectionClass);'

None of the methods have parameters, and I know some of them
(__construct, export, etc.) definitely do.

------------------------------------------------------------------------

[2005-01-10 15:23:00] [EMAIL PROTECTED]

Still an issue?


------------------------------------------------------------------------

[2004-04-23 05:49:55] adam at trachtenberg dot com

Your example is shorter, but I wanted to make it clear 
that things worked okay for user defined classes. BTW, I 
didn't know this was a known issue.

------------------------------------------------------------------------

[2004-04-23 01:50:29] [EMAIL PROTECTED]

This is a known issue for several internal classes.

Btw, why don't you use:
php -r 'ReflectionClass::export($argv[1]);' ?

------------------------------------------------------------------------

[2004-04-23 01:42:41] adam at trachtenberg dot com

Description:
------------
The Reflection API doesn't return parameter information 
for built-in classes, like it does for user-defined 
classes.

Reproduce code:
---------------
// userland class
class ReflectionTest {
  function test($foo, $bar) {}
}

Reflection::export(
  new ReflectionClass('ReflectionTest'));

// example of a system class
Reflection::export(new ReflectionClass('Exception'));

Expected result:
----------------
The "methods" section of "Exception" should look like 
similar to the "methods" section of "ReflectionTest"

In other words, there should be a "Parameters" block for 
methods, like __construct(), that take parameters. This 
doesn't just apply to Exception, but all classes written 
in C.

Actual result:
--------------
ReflectionTest:

  - Methods [1] {
    Method [ <user> public method test ] {
      @@ /www/reflection.php 9 - 9

      - Parameters [2] {
        Parameter #0 [ $foo ]
        Parameter #1 [ $bar ]
      }
    }

Exception: 

  - Methods [9] {
    Method [ <internal> final private method __clone ] {
    }

    Method [ <internal> <ctor> method __construct ] {
    }

    Method [ <internal> final public method getMessage ] 
{
    }

    Method [ <internal> final public method getCode ] {
    }

    Method [ <internal> final public method getFile ] {
    }

    Method [ <internal> final public method getLine ] {
    }

    Method [ <internal> final public method getTrace ] {
    }

    Method [ <internal> final public method 
getTraceAsString ] {
    }

    Method [ <internal> public method __toString ] {
    }


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28114&edit=1

Reply via email to