(PHP 5, PHP 7)
ReflectionParameter::getClass — Get the type hinted class
Gets the class type hinted for the parameter as a ReflectionClass object.
이 함수는 현재 문서화 되어있지 않습니다; 인수 목록만을 제공합니다.
이 함수는 인수가 없습니다.
A ReflectionClass object.
Example #1 Using the ReflectionParameter class
<?php
function foo(Exception $a) { }
$functionReflection = new ReflectionFunction('foo');
$parameters = $functionReflection->getParameters();
$aParameter = $parameters[0];
echo $aParameter->getClass()->name;
?>
위 예제의 출력:
Exception