array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'reflectionclass.getdoccomment.php', 1 => 'ReflectionClass::getDocComment', ), 'up' => array ( 0 => 'class.reflectionclass.php', 1 => 'ReflectionClass', ), 'prev' => array ( 0 => 'reflectionclass.getdefaultproperties.php', 1 => 'ReflectionClass::getDefaultProperties', ), 'next' => array ( 0 => 'reflectionclass.getendline.php', 1 => 'ReflectionClass::getEndLine', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/reflection/reflectionclass/getdoccomment.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
ReflectionClass::getDocComment — Belgelendirici açıklamaları döndürür
Sınıftaki belgelendirici açıklamaları döndürür. Belge açıklamaları
/**
ile başlar ve ardından bir boşluk gelir.
Sınıf tanımının üzerinde çok sayıda belge açıklaması varsa sınıfa en yakın
olanı alınır.
Bu işlevin bağımsız değişkeni yoktur.
Varsa belge açıklamaları, yoksa false
döner.
Örnek 1 - ReflectionClass::getDocComment() örneği
<?php
/**
* A test class
*
* @param foo bar
* @return baz
*/
class TestClass { }
$rc = new ReflectionClass('TestClass');
var_dump($rc->getDocComment());
?>
Yukarıdaki örneğin çıktısı:
string(61) "/** * A test class * * @param foo bar * @return baz */"