MediaWiki REL1_39
Deflate Class Reference

Server-side helper for client-side compressed content. More...

Static Public Member Functions

static inflate ( $data)
 For content that has been compressed with deflate in the client, try to uncompress it with inflate.
 
static isDeflated ( $data)
 Whether the content is deflated.
 

Detailed Description

Server-side helper for client-side compressed content.

Since
1.32

Definition at line 26 of file Deflate.php.

Member Function Documentation

◆ inflate()

static Deflate::inflate ( $data)
static

For content that has been compressed with deflate in the client, try to uncompress it with inflate.

If data is not prefixed with 'rawdeflate,' it will be returned unmodified.

Data can be compressed in the client using the 'mediawiki.deflate' module:

mw.loader.using( 'mediawiki.deflate' ).then( function () {
var deflated = mw.deflate( myContent );
} );
Parameters
string$dataDeflated data
Returns
StatusValue Inflated data will be set as the value
Exceptions
InvalidArgumentExceptionIf the data wasn't deflated

Definition at line 57 of file Deflate.php.

◆ isDeflated()

static Deflate::isDeflated ( $data)
static

Whether the content is deflated.

Parameters
string$data
Returns
bool

Definition at line 35 of file Deflate.php.


The documentation for this class was generated from the following file: