(PHP 5, PHP 7, PHP 8)
ReflectionClass::getMethod — Bir sınıf yöntemi için bir ReflectionMethod nesnesi döndürür
İsmi belirtilen yöntem için bir ReflectionMethod nesnesi döndürür
isimBilgileri yansıtılacak yöntemin ismi.
Bir ReflectionMethod nesnesi.
Yöntem mevcut feğilse bir ReflectionException yavrulanır.
Örnek 1 - ReflectionClass::getMethod() örneği
<?php
$class = new ReflectionClass('ReflectionClass');
$method = $class->getMethod('getMethod');
var_dump($method);
?>Yukarıdaki örneğin çıktısı:
object(ReflectionMethod)#2 (2) {
["name"]=>
string(9) "getMethod"
["class"]=>
string(15) "ReflectionClass"
}