reference/outcontrol/functions/ob-get-flush.xml
86b976d5afaf037868174fe5c242e886eb69baa4
...
...
@@ -3,7 +3,10 @@
3
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">
...
...
@@ -13,21 +16,23 @@
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>
31
36
</refsect1>
32
37

33
38
<refsect1 role="parameters">
...
...
@@ -38,7 +43,15 @@
38
43
<refsect1 role="returnvalues">
39
44
&reftitle.returnvalues;
40
45
<para>
41
-
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>.
42
55
</para>
43
56
</refsect1>
44
57

...
...
@@ -81,9 +94,11 @@ Array
81
94
&reftitle.seealso;
82
95
<para>
83
96
<simplelist>
84
-
<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>
85
100
<member><function>ob_end_flush</function></member>
86
-
<member><function>ob_list_handlers</function></member>
101
+
<member><function>ob_get_clean</function></member>
87
102
</simplelist>
88
103
</para>
89
104
</refsect1>
90
105