Ticket #111 (closed refactoring: fixed)

Opened 6 months ago

Last modified 6 months ago

Reflection classes should allow other reflection instances as parameter on construction

Reported by: mikey Assigned to: mikey
Priority: major Milestone: 0.4.0
Component: ReflectionApi Version: SVN-trunk
Keywords: Cc:

Description

To save some performance it could be a good idea to allow other reflection instances as parameter on the constructor, e.g.:

<?php
class stubReflectionMethod extends ReflectionMethod
{
    ...
    public function __construct($class, $method)
    {
        if ($class instanceof ReflectionClass) {
            $this->class = $class;
            $this->className = $class->getName();
        } else {
            $this->className = $class;
        }

        parent::__construct($this->className);
    }
    ...
}
?>

Change History

11/28/07 13:05:11 changed by mikey

  • status changed from new to assigned.

11/28/07 13:27:11 changed by mikey

Changeset 1079 implements this for net::stubbles::reflection::stubReflectionMethod.

11/28/07 14:02:59 changed by mikey

Changeset 1080 implements this for net::stubbles::reflection::stubReflectionParameter.

11/28/07 14:25:47 changed by mikey

Changeset 1081 implements this for net::stubbles::reflection::stubReflectionProperty.

11/28/07 14:46:34 changed by mikey

  • status changed from assigned to closed.
  • resolution set to fixed.

Usage of the new feature implemented with changeset 1083. Reflection classes constructing other reflection classes now make use of this feature.