reference/classobj/functions/get-class-methods.xml
5ea9b57cba0d2005f15922eb259d2a262a845c5f
...
...
@@ -9,7 +9,7 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>array</type><methodname>get_class_methods</methodname>
12
-
<methodparam><type>mixed</type><parameter>class_name</parameter></methodparam>
12
+
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>object_or_class</parameter></methodparam>
13
13
</methodsynopsis>
14
14
<para>
15
15
Gets the class methods names.
...
...
@@ -20,7 +20,7 @@
20
20
<para>
21
21
<variablelist>
22
22
<varlistentry>
23
-
<term><parameter>class_name</parameter></term>
23
+
<term><parameter>object_or_class</parameter></term>
24
24
<listitem>
25
25
<para>
26
26
The class name or an object instance
...
...
@@ -34,39 +34,32 @@
34
34
&reftitle.returnvalues;
35
35
<para>
36
36
Returns an array of method names defined for the class specified by
37
-
<parameter>class_name</parameter>. In case of an error, it returns &null;.
37
+
<parameter>object_or_class</parameter>.
38
38
</para>
39
39
</refsect1>
40
+

40
41
<refsect1 role="changelog">
41
42
&reftitle.changelog;
42
-
<para>
43
-
<informaltable>
44
-
<tgroup cols="2">
45
-
<thead>
46
-
<row>
47
-
<entry>&Version;</entry>
48
-
<entry>&Description;</entry>
49
-
</row>
50
-
</thead>
51
-
<tbody>
52
-
<row>
53
-
<entry>5.0.0</entry>
54
-
<entry>
55
-
As of PHP 5, this function returns the name of the methods as they
56
-
were declared (case-sensitive). In PHP 4 they were lowercased.
57
-
</entry>
58
-
</row>
59
-
<row>
60
-
<entry>4.0.6</entry>
61
-
<entry>
62
-
The ability of specifying the object itself has been added.
63
-
</entry>
64
-
</row>
65
-
</tbody>
66
-
</tgroup>
67
-
</informaltable>
68
-
</para>
43
+
<informaltable>
44
+
<tgroup cols="2">
45
+
<thead>
46
+
<row>
47
+
<entry>&Version;</entry>
48
+
<entry>&Description;</entry>
49
+
</row>
50
+
</thead>
51
+
<tbody>
52
+
<row>
53
+
<entry>8.0.0</entry>
54
+
<entry>
55
+
The <parameter>object_or_class</parameter> parameter now only accepts objects or valid class names.
56
+
</entry>
57
+
</row>
58
+
</tbody>
59
+
</tgroup>
60
+
</informaltable>
69
61
</refsect1>
62
+

70
63
<refsect1 role="examples">
71
64
&reftitle.examples;
72
65
<para>
...
...
@@ -78,7 +71,7 @@
78
71

79
72
class myclass {
80
73
// constructor
81
-
function myclass()
74
+
function __construct()
82
75
{
83
76
return(true);
84
77
}
...
...
@@ -110,7 +103,7 @@ foreach ($class_methods as $method_name) {
110
103
&example.outputs;
111
104
<screen>
112
105
<![CDATA[
113
-
myclass
106
+
__construct
114
107
myfunc1
115
108
myfunc2
116
109
]]>
...
...
@@ -129,7 +122,6 @@ myfunc2
129
122
</para>
130
123
</refsect1>
131
124
</refentry>
132
-

133
125
<!-- Keep this comment at the end of the file
134
126
Local variables:
135
127
mode: sgml
136
128