ReflectionMethod::getDeclaringClass
(PHP 5)
ReflectionMethod::getDeclaringClass — Gets declaring class for the reflected method.
Descrizione
Gets the declaring class for the reflected method.
Elenco dei parametri
Questa funzione non contiene parametri.
Valori restituiti
A ReflectionClass object of the class that the reflected method is part of.
Esempi
Example #1 ReflectionMethod::getDeclaringClass() example
<?php
class HelloWorld {
protected function sayHelloTo($name) {
return 'Hello ' . $name;
}
}
$reflectionMethod = new ReflectionMethod(new HelloWorld(), 'sayHelloTo');
var_dump($reflectionMethod->getDeclaringClass());
?>
Il precedente esempio visualizzerĂ :
object(ReflectionClass)#2 (1) {
["name"]=>
string(10) "HelloWorld"
}
There are no user contributed notes for this page.
