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

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

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
11
+
<methodsynopsis role="ReflectionFunctionAbstract">
13
12
<modifier>public</modifier> <type>bool</type><methodname>ReflectionFunctionAbstract::isClosure</methodname>
14
-
<void />
13
+
<void/>
15
14
</methodsynopsis>
16
15
<para>
17
-
Checks whether it's a closure.
16
+
Checks whether the reflected function is a <classname>Closure</classname>.
18
17
</para>
19
-

20
-
&warn.undocumented.func;
21
-

22
18
</refsect1>
23
19

24
20
<refsect1 role="parameters">
...
...
@@ -29,7 +25,38 @@
29
25
<refsect1 role="returnvalues">
30
26
&reftitle.returnvalues;
31
27
<para>
32
-
&true; if it's a closure, otherwise &false;
28
+
Returns &true; if the function is a <classname>Closure</classname>, otherwise &false;.
29
+
</para>
30
+
</refsect1>
31
+

32
+
<refsect1 role="examples">
33
+
&reftitle.examples;
34
+
<para>
35
+
<example>
36
+
<title><methodname>ReflectionFunctionAbstract::isClosure</methodname> example</title>
37
+
<programlisting role="php">
38
+
<![CDATA[
39
+
<?php
40
+
// Non-closure
41
+
$function1 = 'str_replace';
42
+
$reflection1 = new ReflectionFunction($function1);
43
+
var_dump($reflection1->isClosure());
44
+

45
+
// Closure
46
+
$function2 = function () {};
47
+
$reflection2 = new ReflectionFunction($function2);
48
+
var_dump($reflection2->isClosure());
49
+
?>
50
+
]]>
51
+
</programlisting>
52
+
&example.outputs;
53
+
<screen>
54
+
<![CDATA[
55
+
bool(false)
56
+
bool(true)
57
+
]]>
58
+
</screen>
59
+
</example>
33
60
</para>
34
61
</refsect1>
35
62

...
...
@@ -37,13 +64,12 @@
37
64
&reftitle.seealso;
38
65
<para>
39
66
<simplelist>
40
-
<member><methodname>ReflectionFunctionAbstract::</methodname></member>
67
+
<member><methodname>ReflectionFunctionAbstract::isGenerator</methodname></member>
41
68
</simplelist>
42
69
</para>
43
70
</refsect1>
44
71

45
72
</refentry>
46
-

47
73
<!-- Keep this comment at the end of the file
48
74
Local variables:
49
75
mode: sgml
50
76