array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'reflectionclass.getmethod.php', 1 => 'ReflectionClass::getMethod', ), 'up' => array ( 0 => 'class.reflectionclass.php', 1 => 'ReflectionClass', ), 'prev' => array ( 0 => 'reflectionclass.getinterfaces.php', 1 => 'ReflectionClass::getInterfaces', ), 'next' => array ( 0 => 'reflectionclass.getmethods.php', 1 => 'ReflectionClass::getMethods', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/reflection/reflectionclass/getmethod.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(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
isim
Bilgileri 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" }