‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\Utility\CompressionUtility Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Utility\CompressionUtility:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

string compressionOutputHandler ($outputBuffer, $mode)
 

Protected Attributes

int $contentLength = 0
 

Detailed Description

This class contains compression functions for the TYPO3 Frontend. It can be used only in EXT:frontend/Classes/Http/RequestHandler.php

this is an internal TYPO3 implementation and solely used for EXT:frontend and not part of TYPO3's Core API.

Definition at line 26 of file CompressionUtility.php.

Member Function Documentation

◆ compressionOutputHandler()

string TYPO3\CMS\Frontend\Utility\CompressionUtility::compressionOutputHandler (   $outputBuffer,
  $mode 
)

Corrects HTTP "Content-length" header if it was sent by TYPO3 and compression is enabled.

Parameters
string$outputBuffer‪Output buffer to compress
int$mode‪One of PHP_OUTPUT_HANDLER_xxx constants
Returns
‪string Compressed string
See also
‪ob_start()
‪ob_gzhandler()

Definition at line 46 of file CompressionUtility.php.

Member Data Documentation

◆ $contentLength

int TYPO3\CMS\Frontend\Utility\CompressionUtility::$contentLength = 0
protected

Accumulates content length for the compressed content. It is necessary to replace the Content-length HTTP header after compression if it was added by TYPO3 before compression.

Definition at line 34 of file CompressionUtility.php.