ReflectionParameter::getClass
(PHP 5)
ReflectionParameter::getClass — Get the type hinted class
Descrição
Gets the class type hinted for the parameter as a ReflectionClass object.
Warning
Esta função não está documentada; somente a lista de argumentos está disponível.
Parâmetros
Esta função não possui parâmetros.
Valor Retornado
A ReflectionClass object.
Exemplos
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;
?>
O exemplo acima irá imprimir:
Exception