reference/reflection/reflectionclass/getmethods.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.getmethods" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>ReflectionClass::getMethods</refname>
...
...
@@ -9,9 +8,9 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
11
+
<methodsynopsis role="ReflectionClass">
13
12
<modifier>public</modifier> <type>array</type><methodname>ReflectionClass::getMethods</methodname>
14
-
<methodparam choice="opt"><type>int</type><parameter>filter</parameter></methodparam>
13
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>filter</parameter><initializer>&null;</initializer></methodparam>
15
14
</methodsynopsis>
16
15
<para>
17
16
Gets an array of methods for the class.
...
...
@@ -30,13 +29,22 @@
30
29
to no filtering.
31
30
</para>
32
31
<para>
33
-
Any combination of <constant>ReflectionMethod::IS_STATIC</constant>,
32
+
Any bitwise disjunction of <constant>ReflectionMethod::IS_STATIC</constant>,
34
33
<constant>ReflectionMethod::IS_PUBLIC</constant>,
35
34
<constant>ReflectionMethod::IS_PROTECTED</constant>,
36
35
<constant>ReflectionMethod::IS_PRIVATE</constant>,
37
36
<constant>ReflectionMethod::IS_ABSTRACT</constant>,
38
-
<constant>ReflectionMethod::IS_FINAL</constant>.
37
+
<constant>ReflectionMethod::IS_FINAL</constant>,
38
+
so that all methods with <emphasis>any</emphasis> of the given
39
+
attributes will be returned.
39
40
</para>
41
+
<note>
42
+
<simpara>
43
+
Note that other bitwise operations, for instance <literal>~</literal>
44
+
will not work as expected. In other words, it is not possible to
45
+
retrieve all non-static methods, for example.
46
+
</simpara>
47
+
</note>
40
48
</listitem>
41
49
</varlistentry>
42
50
</variablelist>
...
...
@@ -51,6 +59,28 @@
51
59
</para>
52
60
</refsect1>
53
61
62
+
<refsect1 role="changelog">
63
+
&reftitle.changelog;
64
+
<informaltable>
65
+
<tgroup cols="2">
66
+
<thead>
67
+
<row>
68
+
<entry>&Version;</entry>
69
+
<entry>&Description;</entry>
70
+
</row>
71
+
</thead>
72
+
<tbody>
73
+
<row>
74
+
<entry>7.2.0</entry>
75
+
<entry>
76
+
<parameter>filter</parameter> is nullable now.
77
+
</entry>
78
+
</row>
79
+
</tbody>
80
+
</tgroup>
81
+
</informaltable>
82
+
</refsect1>
83
+

54
84
<refsect1 role="examples">
55
85
&reftitle.examples;
56
86
<para>
...
...
@@ -76,21 +106,21 @@ var_dump($methods);
76
106
<![CDATA[
77
107
array(3) {
78
108
[0]=>
79
-
&object(ReflectionMethod)#2 (2) {
109
+
object(ReflectionMethod)#2 (2) {
80
110
["name"]=>
81
111
string(11) "firstMethod"
82
112
["class"]=>
83
113
string(5) "Apple"
84
114
}
85
115
[1]=>
86
-
&object(ReflectionMethod)#3 (2) {
116
+
object(ReflectionMethod)#3 (2) {
87
117
["name"]=>
88
118
string(12) "secondMethod"
89
119
["class"]=>
90
120
string(5) "Apple"
91
121
}
92
122
[2]=>
93
-
&object(ReflectionMethod)#4 (2) {
123
+
object(ReflectionMethod)#4 (2) {
94
124
["name"]=>
95
125
string(11) "thirdMethod"
96
126
["class"]=>
...
...
@@ -124,14 +154,14 @@ var_dump($methods);
124
154
<![CDATA[
125
155
array(2) {
126
156
[0]=>
127
-
&object(ReflectionMethod)#2 (2) {
157
+
object(ReflectionMethod)#2 (2) {
128
158
["name"]=>
129
159
string(12) "secondMethod"
130
160
["class"]=>
131
161
string(5) "Apple"
132
162
}
133
163
[1]=>
134
-
&object(ReflectionMethod)#3 (2) {
164
+
object(ReflectionMethod)#3 (2) {
135
165
["name"]=>
136
166
string(11) "thirdMethod"
137
167
["class"]=>
...
...
@@ -149,12 +179,12 @@ array(2) {
149
179
<para>
150
180
<simplelist>
151
181
<member><methodname>ReflectionClass::getMethod</methodname></member>
182
+
<member><function>get_class_methods</function></member>
152
183
</simplelist>
153
184
</para>
154
185
</refsect1>
155
186

156
187
</refentry>
157
-

158
188
<!-- Keep this comment at the end of the file
159
189
Local variables:
160
190
mode: sgml
161
191