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

4
3
<refentry xml:id="reflection.getmodifiernames" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>Reflection::getModifierNames</refname>
...
...
@@ -9,16 +8,13 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
11
+
<methodsynopsis role="Reflection">
13
12
<modifier>public</modifier> <modifier>static</modifier> <type>array</type><methodname>Reflection::getModifierNames</methodname>
14
13
<methodparam><type>int</type><parameter>modifiers</parameter></methodparam>
15
14
</methodsynopsis>
16
15
<para>
17
16
Gets modifier names.
18
17
</para>
19
-

20
-
&warn.undocumented.func;
21
-

22
18
</refsect1>
23
19

24
20
<refsect1 role="parameters">
...
...
@@ -29,7 +25,7 @@
29
25
<term><parameter>modifiers</parameter></term>
30
26
<listitem>
31
27
<para>
32
-
The modifiers to get, which is from a numeric value.
28
+
Bitfield of the modifiers to get.
33
29
</para>
34
30
</listitem>
35
31
</varlistentry>
...
...
@@ -44,17 +40,68 @@
44
40
</para>
45
41
</refsect1>
46
42

43
+
<refsect1 role="examples">
44
+
&reftitle.examples;
45
+
<para>
46
+
<example>
47
+
<title><methodname>Reflection::getModifierNames</methodname> example</title>
48
+
<programlisting role="php">
49
+
<![CDATA[
50
+
<?php
51
+
class Testing
52
+
{
53
+
final public static function foo()
54
+
{
55
+
return;
56
+
}
57
+

58
+
public function bar()
59
+
{
60
+
return;
61
+
}
62
+
}
63
+

64
+
$foo = new ReflectionMethod('Testing', 'foo');
65
+

66
+
echo "Modifiers for method foo():\n";
67
+
echo $foo->getModifiers() . "\n";
68
+
echo implode(' ', Reflection::getModifierNames($foo->getModifiers())) . "\n";
69
+

70
+
$bar = new ReflectionMethod('Testing', 'bar');
71
+

72
+
echo "Modifiers for method bar():\n";
73
+
echo $bar->getModifiers() . "\n";
74
+
echo implode(' ', Reflection::getModifierNames($bar->getModifiers()));
75
+
]]>
76
+
</programlisting>
77
+
&example.outputs.similar;
78
+
<screen>
79
+
<![CDATA[
80
+
Modifiers for method foo():
81
+
261
82
+
final public static
83
+
Modifiers for method bar():
84
+
65792
85
+
public
86
+
]]>
87
+
</screen>
88
+
</example>
89
+
</para>
90
+
</refsect1>
91
+

47
92
<refsect1 role="seealso">
48
93
&reftitle.seealso;
49
94
<para>
50
95
<simplelist>
51
-
<member><methodname>Reflection::export</methodname></member>
96
+
<member><methodname>ReflectionClass::getModifiers</methodname></member>
97
+
<member><methodname>ReflectionClassConstant::getModifiers</methodname></member>
98
+
<member><methodname>ReflectionMethod::getModifiers</methodname></member>
99
+
<member><methodname>ReflectionProperty::getModifiers</methodname></member>
52
100
</simplelist>
53
101
</para>
54
102
</refsect1>
55
103

56
104
</refentry>
57
-

58
105
<!-- Keep this comment at the end of the file
59
106
Local variables:
60
107
mode: sgml
61
108