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

4
3
<refentry xml:id="reflectionmethod.getclosure" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>ReflectionMethod::getClosure</refname>
...
...
@@ -9,16 +8,14 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
11
+
<methodsynopsis role="ReflectionMethod">
13
12
<modifier>public</modifier> <type>Closure</type><methodname>ReflectionMethod::getClosure</methodname>
14
-
<methodparam><type>object</type><parameter>object</parameter></methodparam>
13
+
<methodparam choice="opt"><type class="union"><type>object</type><type>null</type></type><parameter>object</parameter><initializer>&null;</initializer></methodparam>
15
14
</methodsynopsis>
16
15
<para>
17
-

16
+
Create a closure which will call the method.
18
17
</para>
19
18

20
-
&warn.undocumented.func;
21
-

22
19
</refsect1>
23
20

24
21
<refsect1 role="parameters">
...
...
@@ -38,14 +35,50 @@
38
35
<refsect1 role="returnvalues">
39
36
&reftitle.returnvalues;
40
37
<para>
41
-
Returns <classname>Closure</classname>.
42
-
Returns &null; in case of an error.
38
+
Returns the newly created <classname>Closure</classname>.
43
39
</para>
44
40
</refsect1>
45
41

42
+
<refsect1 role="errors">
43
+
&reftitle.errors;
44
+
<para>
45
+
Throws a <classname>ValueError</classname> if <parameter>object</parameter> is &null; but the method is non-static.
46
+
</para>
47
+
<para>
48
+
Throws a <classname>ReflectionException</classname> if <parameter>object</parameter> is not an instance of the class this method was declared in.
49
+
</para>
50
+
</refsect1>
46
51

47
-
</refentry>
52
+
<refsect1 role="changelog">
53
+
&reftitle.changelog;
54
+
<informaltable>
55
+
<tgroup cols="2">
56
+
<thead>
57
+
<row>
58
+
<entry>&Version;</entry>
59
+
<entry>&Description;</entry>
60
+
</row>
61
+
</thead>
62
+
<tbody>
63
+
<row>
64
+
<entry>8.0.0</entry>
65
+
<entry>
66
+
<parameter>object</parameter> is now nullable.
67
+
</entry>
68
+
</row>
69
+
</tbody>
70
+
</tgroup>
71
+
</informaltable>
72
+
</refsect1>
48
73

74
+
<refsect1 role="seealso">
75
+
&reftitle.seealso;
76
+
<simplelist>
77
+
<member><link linkend="functions.first_class_callable_syntax">First class callable syntax</link></member>
78
+
</simplelist>
79
+
</refsect1>
80
+

81
+
</refentry>
49
82
<!-- Keep this comment at the end of the file
50
83
Local variables:
51
84
mode: sgml
52
85