getTargetName() public method

타겟 클래스 이름을 조회한다.
public getTargetName ( ) : string
return string
Exemplo n.º 1
0
 /**
  * 주어진 프록시 클래스 템플릿 코드의 클래스 선언부를 변환한다.
  *
  * @param string      $code   프록시 클래스 탬플릿 코드
  * @param ProxyConfig $config 동적으로 생성하려는 프록시 클래스 정보
  *
  * @return string
  */
 public function apply($code, ProxyConfig $config)
 {
     $code = str_replace('class Proxy', 'class ' . $config->getProxyName() . ' extends ' . $config->getTargetName(), $code);
     return $code;
 }
 public function testGetTargetName()
 {
     $config = new ProxyConfig('\\Xpressengine\\Tests\\ProxyConfigTest\\TestTargetClass');
     $name = $config->getTargetName();
     $this->assertEquals('Xpressengine\\Tests\\ProxyConfigTest\\TestTargetClass', $name);
 }