Ticket #111 (closed refactoring: fixed)

Opened 3 years ago

Last modified 5 months ago

Reflection classes should allow other reflection instances as parameter on construction

Reported by: mikey Owned by: 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

Changed 3 years ago by mikey

  • status changed from new to assigned

Changed 3 years ago by mikey

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

Changed 3 years ago by mikey

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

Changed 3 years ago by mikey

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

Changed 3 years ago 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.

Note: See TracTickets for help on using tickets.