TYPO3 CMS
TYPO3_6-2
Main Page
Related Pages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
CompressionUtility.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Frontend\Utility
;
3
22
class
CompressionUtility
implements
\TYPO3\CMS\Core\SingletonInterface
{
23
31
protected
$contentLength
= 0;
32
44
public
function
compressionOutputHandler
($outputBuffer, $mode) {
45
// Compress the content
46
$outputBuffer = ob_gzhandler($outputBuffer, $mode);
47
if
($outputBuffer !== FALSE) {
48
// Save compressed size
49
$this->contentLength += strlen($outputBuffer);
50
// Check if this was the last content chunk
51
if
(0 != ($mode & PHP_OUTPUT_HANDLER_END)) {
52
// Check if we have content-length header
53
foreach
(headers_list() as $header) {
54
if
(0 == strncasecmp(
'Content-length:'
, $header, 15)) {
55
header(
'Content-length: '
. $this->contentLength);
56
break
;
57
}
58
}
59
}
60
}
61
return
$outputBuffer;
62
}
63
64
}
TYPO3\CMS\Frontend\Utility\CompressionUtility\compressionOutputHandler
compressionOutputHandler($outputBuffer, $mode)
Definition:
CompressionUtility.php:44
TYPO3\CMS\Frontend\Utility\CompressionUtility\$contentLength
$contentLength
Definition:
CompressionUtility.php:31
TYPO3\CMS\Frontend\Utility\CompressionUtility
Definition:
CompressionUtility.php:22
TYPO3\CMS\Frontend\Utility
Definition:
CompressionUtility.php:2
TYPO3\CMS\Core\SingletonInterface
Definition:
SingletonInterface.php:22
typo3
sysext
frontend
Classes
Utility
CompressionUtility.php
Generated on Wed Aug 7 2019 09:52:28 for TYPO3 CMS by
1.8.13