Neos\Flow\Reflection\ClassReflection::getMethod PHP Method

getMethod() public method

Replacement for the original getMethod() method which makes sure that MethodReflection objects are returned instead of the orginal ReflectionMethod instances.
public getMethod ( string $name ) : MethodReflection
$name string
return MethodReflection Method reflection object of the named method
    public function getMethod($name)
    {
        return new MethodReflection($this->getName(), $name);
    }

Usage Example

 /**
  * @test
  */
 public function getMethodReturnsFlowsMethodReflection()
 {
     $class = new ClassReflection(__CLASS__);
     $method = $class->getMethod('getMethodReturnsFlowsMethodReflection');
     $this->assertInstanceOf(MethodReflection::class, $method, 'The returned method is not of type \\Neos\\Flow\\Reflection\\MethodReflection.');
 }
All Usage Examples Of Neos\Flow\Reflection\ClassReflection::getMethod