reference/reflection/reflectionclass/getdoccomment.xml
ec2fe9a592f794978114ef5021db9f1d00c2e05d
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="reflectionclass.getdoccomment" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>ReflectionClass::getDocComment</refname>
...
...
@@ -9,16 +8,16 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
13
-
<modifier>public</modifier> <type>string</type><methodname>ReflectionClass::getDocComment</methodname>
14
-
<void />
11
+
<methodsynopsis role="ReflectionClass">
12
+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>ReflectionClass::getDocComment</methodname>
13
+
<void/>
15
14
</methodsynopsis>
16
15
<para>
17
-
Gets doc comments from a class.
16
+
Gets doc comments from a class. Doc comments start with <literal>/**</literal>, followed by whitespace.
17
+
If there are multiple doc comments above the class definition,
18
+
the one closest to the class will be taken.
18
19
</para>
19
20

20
-
&warn.undocumented.func;
21
-

22
21
</refsect1>
23
22

24
23
<refsect1 role="parameters">
...
...
@@ -29,7 +28,7 @@
29
28
<refsect1 role="returnvalues">
30
29
&reftitle.returnvalues;
31
30
<para>
32
-
The doc comment if it exists, otherwise &false;
31
+
The doc comment if it exists, otherwise &false;.
33
32
</para>
34
33
</refsect1>
35
34

...
...
@@ -42,27 +41,27 @@
42
41
<![CDATA[
43
42
<?php
44
43
/**
45
-
* A test class
46
-
*
47
-
* @param foo bar
48
-
* @return baz
49
-
*/
44
+
* A test class
45
+
*
46
+
* @param foo bar
47
+
* @return baz
48
+
*/
50
49
class TestClass { }
51
50

52
51
$rc = new ReflectionClass('TestClass');
53
-
var_dump($rc->getDocComment())
52
+
var_dump($rc->getDocComment());
54
53
?>
55
54
]]>
56
55
</programlisting>
57
56
&example.outputs;
58
57
<screen>
59
58
<![CDATA[
60
-
string(55) "/**
61
-
* A test class
62
-
*
63
-
* @param foo bar
64
-
* @return baz
65
-
*/"
59
+
string(61) "/**
60
+
* A test class
61
+
*
62
+
* @param foo bar
63
+
* @return baz
64
+
*/"
66
65
]]>
67
66
</screen>
68
67
</example>
...
...
@@ -79,7 +78,6 @@ string(55) "/**
79
78
</refsect1>
80
79

81
80
</refentry>
82
-

83
81
<!-- Keep this comment at the end of the file
84
82
Local variables:
85
83
mode: sgml
86
84