svn: /phpdoc/en/trunk/reference/reflection/reflectionproperty/ getdoccomment.xml

From: Date: Wed, 06 Jan 2016 20:03:57 +0000
Subject: svn: /phpdoc/en/trunk/reference/reflection/reflectionproperty/ getdoccomment.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13951@lists.php.net to get a copy of this message
tpunt Wed, 06 Jan 2016 20:03:57 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=338413 Log: Finish documenting ReflectionProperty::getDocComment Changed paths: U phpdoc/en/trunk/reference/reflection/reflectionproperty/getdoccomment.xml Modified: phpdoc/en/trunk/reference/reflection/reflectionproperty/getdoccomment.xml =================================================================== --- phpdoc/en/trunk/reference/reflection/reflectionproperty/getdoccomment.xml 2016-01-06 19:30:43 UTC (rev 338412) +++ phpdoc/en/trunk/reference/reflection/reflectionproperty/getdoccomment.xml 2016-01-06 20:03:57 UTC (rev 338413) @@ -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,15 +26,53 @@ <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> + <refsect1 role="seealso"> &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>

« previous php.doc.cvs (#13951) next »