Finish documenting ReflectionProperty::getDocComment

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338413 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Thomas Punt 2016-01-06 20:03:57 +00:00
parent e9ee73654f
commit 4d8bee3f1d

View file

@ -4,7 +4,7 @@
<refentry xml:id="reflectionproperty.getdoccomment" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionProperty::getDocComment</refname>
<refpurpose>Gets doc comment</refpurpose>
<refpurpose>Gets the property doc comment</refpurpose>
</refnamediv>
<refsect1 role="description">
@ -14,11 +14,8 @@
<void />
</methodsynopsis>
<para>
Gets the doc comment.
Gets the doc comment for a property.
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
@ -29,7 +26,43 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The doc comment.
The property doc comment.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><methodname>ReflectionProperty::__construct</methodname> example</title>
<programlisting role="php">
<![CDATA[
<?php
class Str
{
/**
* @var int The length of the string
*/
public $length = 5;
}
// Create an instance of the ReflectionProperty class
$prop = new ReflectionProperty('Str', 'length');
var_dump($prop->getDocComment());
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
string(53) "/**
* @var int The length of the string
*/"
]]>
</screen>
</example>
</para>
</refsect1>
@ -37,7 +70,9 @@
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>ReflectionProperty::export</methodname></member>
<member><methodname>ReflectionProperty::getModifiers</methodname></member>
<member><methodname>ReflectionProperty::getName</methodname></member>
<member><methodname>ReflectionProperty::getValue</methodname></member>
</simplelist>
</para>
</refsect1>