array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'reflectionclass.getproperty.php', 1 => 'ReflectionClass::getProperty', ), 'up' => array ( 0 => 'class.reflectionclass.php', 1 => 'ReflectionClass', ), 'prev' => array ( 0 => 'reflectionclass.getproperties.php', 1 => 'ReflectionClass::getProperties', ), 'next' => array ( 0 => 'reflectionclass.getreflectionconstant.php', 1 => 'ReflectionClass::getReflectionConstant', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/reflection/reflectionclass/getproperty.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
ReflectionClass::getProperty — Bir sınıf özelliği için bir ReflectionProperty döndürür
Bir sınıf özelliği için bir ReflectionProperty döndürür.
isim
Özelliğin ismi.
Bir ReflectionProperty nesnesi.
Örnek 1 - ReflectionClass::getProperty() örneği
<?php
$class = new ReflectionClass('ReflectionClass');
$property = $class->getProperty('name');
var_dump($property);
?>
Yukarıdaki örneğin çıktısı:
object(ReflectionProperty)#2 (2) { ["name"]=> string(4) "name" ["class"]=> string(15) "ReflectionClass" }