Xpressengine\Interception\Proxy\ProxyConfig::getTargetMethods PHP Method

getTargetMethods() public method

Interception은 타겟 클래스의 public 메소드만 대상으로 한다.
public getTargetMethods ( ) : ReflectionMetho\ReflectionMethod[]
return ReflectionMetho\ReflectionMethod[] 수정할 메소드 목록
    public function getTargetMethods()
    {
        $this->resolveRfc();
        $methods = $this->rfc->getMethods(ReflectionMethod::IS_PUBLIC);
        return $methods;
    }

Usage Example

 public function testGetTargetMethods()
 {
     $config = new ProxyConfig('\\Xpressengine\\Tests\\ProxyConfigTest\\TestTargetClass');
     $methods = $config->getTargetMethods();
     $this->assertCount(2, $methods);
     $funA = array_shift($methods);
     $this->assertInstanceOf(ReflectionMethod::class, $funA);
     $this->assertEquals('funcA', $funA->getName());
 }
All Usage Examples Of Xpressengine\Interception\Proxy\ProxyConfig::getTargetMethods