reference/outcontrol/functions/ob-clean.xml
86b976d5afaf037868174fe5c242e886eb69baa4
...
...
@@ -1,36 +1,50 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ob-clean">
3
+
<refentry xml:id="function.ob-clean" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>ob_clean</refname>
6
-
<refpurpose>Clean (erase) the output buffer</refpurpose>
6
+
<refpurpose>Clean (erase) the contents of the active output buffer</refpurpose>
7
7
</refnamediv>
8
8

9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>void</type><methodname>ob_clean</methodname>
12
+
<type>bool</type><methodname>ob_clean</methodname>
13
13
<void/>
14
14
</methodsynopsis>
15
15
<para>
16
-
This function discards the contents of the output buffer.
16
+
This function calls the output handler
17
+
(with the <constant>PHP_OUTPUT_HANDLER_CLEAN</constant> flag),
18
+
discards it's return value
19
+
and cleans (erases) the contents of the active output buffer.
17
20
</para>
18
21
<para>
19
-
This function does not destroy the output buffer like
20
-
<function>ob_end_clean</function> does.
22
+
This function does not turn off the active output buffer like
23
+
<function>ob_end_clean</function> or <function>ob_get_clean</function> does.
21
24
</para>
22
25
<para>
23
-
The output buffer must be started by
24
-
<function>ob_start</function> with <link
25
-
linkend="constant.php-output-handler-cleanable">PHP_OUTPUT_HANDLER_CLEANABLE</link>
26
-
flag. Otherwise <function>ob_clean</function> will not work.
26
+
<function>ob_clean</function> will fail
27
+
without an active output buffer started with the
28
+
<constant>PHP_OUTPUT_HANDLER_CLEANABLE</constant> flag.
27
29
</para>
28
30
</refsect1>
29
31

32
+
<refsect1 role="parameters">
33
+
&reftitle.parameters;
34
+
&no.function.parameters;
35
+
</refsect1>
36
+

30
37
<refsect1 role="returnvalues">
31
38
&reftitle.returnvalues;
32
39
<para>
33
-
&return.void;
40
+
&return.success;
41
+
</para>
42
+
</refsect1>
43
+

44
+
<refsect1 role="errors">
45
+
&reftitle.errors;
46
+
<para>
47
+
If the function fails it generates an <constant>E_NOTICE</constant>.
34
48
</para>
35
49
</refsect1>
36
50

...
...
@@ -38,15 +52,16 @@
38
52
&reftitle.seealso;
39
53
<para>
40
54
<simplelist>
41
-
<member><function>ob_flush</function></member>
42
-
<member><function>ob_end_flush</function></member>
55
+
<member><function>ob_start</function></member>
56
+
<member><function>ob_get_contents</function></member>
43
57
<member><function>ob_end_clean</function></member>
58
+
<member><function>ob_get_clean</function></member>
59
+
<member><function>ob_flush</function></member>
44
60
</simplelist>
45
61
</para>
46
62
</refsect1>
47
63

48
64
</refentry>
49
-

50
65
<!-- Keep this comment at the end of the file
51
66
Local variables:
52
67
mode: sgml
53
68