reference/outcontrol/functions/ob-get-flush.xml
86b976d5afaf037868174fe5c242e886eb69baa4
...
...
@@ -1,39 +1,57 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ob-get-flush">
3
+
<refentry xml:id="function.ob-get-flush" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>ob_get_flush</refname>
6
-
<refpurpose>Flush the output buffer, return it as a string and turn off output buffering</refpurpose>
6
+
<refpurpose>
7
+
Flush (send) the return value of the active output handler,
8
+
return the contents of the active output buffer and turn it off
9
+
</refpurpose>
7
10
</refnamediv>
8
11

9
12
<refsect1 role="description">
10
13
&reftitle.description;
11
14
<methodsynopsis>
12
-
<type>string</type><methodname>ob_get_flush</methodname>
15
+
<type class="union"><type>string</type><type>false</type></type><methodname>ob_get_flush</methodname>
13
16
<void/>
14
17
</methodsynopsis>
15
18
<para>
16
-
<function>ob_get_flush</function> flushes the output buffer, return
17
-
it as a string and turns off output buffering.
19
+
This function calls the output handler
20
+
(with the <constant>PHP_OUTPUT_HANDLER_FINAL</constant> flag),
21
+
flushes (sends) it's return value,
22
+
returns the contents of the active output buffer
23
+
and turns off the active output buffer.
18
24
</para>
19
25
<para>
20
-
The output buffer must be started by
21
-
<function>ob_start</function> with <link
22
-
linkend="constant.php-output-handler-flushable">PHP_OUTPUT_HANDLER_FLUSHABLE</link>
23
-
flag. Otherwise <function>ob_get_flush</function> will not work.
26
+
<function>ob_get_flush</function> will fail
27
+
without an active output buffer started with the
28
+
<constant>PHP_OUTPUT_HANDLER_REMOVABLE</constant> flag.
29
+
</para>
30
+
<para>
31
+
<function>ob_get_flush</function> will flush (send)
32
+
the return value of the output handler
33
+
even if the active output buffer was started without the
34
+
<constant>PHP_OUTPUT_HANDLER_FLUSHABLE</constant> flag.
24
35
</para>
25
-
<note>
26
-
<simpara>
27
-
This function is similar to <function>ob_end_flush</function>, except
28
-
that this function also returns the buffer as a string.
29
-
</simpara>
30
-
</note>
36
+
</refsect1>
37
+

38
+
<refsect1 role="parameters">
39
+
&reftitle.parameters;
40
+
&no.function.parameters;
31
41
</refsect1>
32
42

33
43
<refsect1 role="returnvalues">
34
44
&reftitle.returnvalues;
35
45
<para>
36
-
Returns the output buffer or &false; if no buffering is active.
46
+
Returns the contents of the active output buffer on success
47
+
or &false; on failure.
48
+
</para>
49
+
</refsect1>
50
+

51
+
<refsect1 role="errors">
52
+
&reftitle.errors;
53
+
<para>
54
+
If the function fails it generates an <constant>E_NOTICE</constant>.
37
55
</para>
38
56
</refsect1>
39
57

...
...
@@ -76,15 +94,16 @@ Array
76
94
&reftitle.seealso;
77
95
<para>
78
96
<simplelist>
79
-
<member><function>ob_end_clean</function></member>
97
+
<member><function>ob_start</function></member>
98
+
<member><function>ob_get_contents</function></member>
99
+
<member><function>ob_flush</function></member>
80
100
<member><function>ob_end_flush</function></member>
81
-
<member><function>ob_list_handlers</function></member>
101
+
<member><function>ob_get_clean</function></member>
82
102
</simplelist>
83
103
</para>
84
104
</refsect1>
85
105

86
106
</refentry>
87
-

88
107
<!-- Keep this comment at the end of the file
89
108
Local variables:
90
109
mode: sgml
91
110