MediaWiki REL1_34
SerializedValueContainer Class Reference

Helper class for segmenting large cache values without relying on serializing classes. More...

Static Public Member Functions

static isSegmented ( $value)
 
static isUnified ( $value)
 
static newSegmented (array $segmentHashList)
 
static newUnified ( $serialized)
 

Public Attributes

const SCHEMA = '__svc_schema__'
 
const SCHEMA_SEGMENTED = 'CAYCDAgCDw4'
 
const SCHEMA_UNIFIED = 'DAAIDgoKAQw'
 
const SEGMENTED_HASHES = '__hashes__'
 
const UNIFIED_DATA = '__data__'
 

Static Private Member Functions

static instanceOf ( $value, $schema)
 

Detailed Description

Helper class for segmenting large cache values without relying on serializing classes.

Since
1.34

Definition at line 8 of file SerializedValueContainer.php.

Member Function Documentation

◆ instanceOf()

static SerializedValueContainer::instanceOf (   $value,
  $schema 
)
staticprivate
Parameters
mixed$value
string$schemaSCHEMA_* class constant
Returns
bool

Definition at line 59 of file SerializedValueContainer.php.

Referenced by isSegmented(), and isUnified().

◆ isSegmented()

static SerializedValueContainer::isSegmented (   $value)
static
Parameters
mixed$value
Returns
bool

Definition at line 50 of file SerializedValueContainer.php.

References instanceOf().

Referenced by MediumSpecificBagOStuff\delete().

◆ isUnified()

static SerializedValueContainer::isUnified (   $value)
static
Parameters
mixed$value
Returns
bool

Definition at line 42 of file SerializedValueContainer.php.

References instanceOf().

Referenced by MediumSpecificBagOStuff\resolveSegments().

◆ newSegmented()

static SerializedValueContainer::newSegmented ( array  $segmentHashList)
static
Parameters
string[]$segmentHashListOrdered list of hashes for each segment
Returns
stdClass

Definition at line 31 of file SerializedValueContainer.php.

References SCHEMA_SEGMENTED.

Referenced by MediumSpecificBagOStuff\makeValueOrSegmentList().

◆ newUnified()

static SerializedValueContainer::newUnified (   $serialized)
static
Parameters
string$serialized
Returns
stdClass

Definition at line 20 of file SerializedValueContainer.php.

References $serialized, and SCHEMA_UNIFIED.

Referenced by MediumSpecificBagOStuff\makeValueOrSegmentList().

Member Data Documentation

◆ SCHEMA

const SerializedValueContainer::SCHEMA = '__svc_schema__'

Definition at line 9 of file SerializedValueContainer.php.

◆ SCHEMA_SEGMENTED

const SerializedValueContainer::SCHEMA_SEGMENTED = 'CAYCDAgCDw4'

Definition at line 11 of file SerializedValueContainer.php.

Referenced by newSegmented().

◆ SCHEMA_UNIFIED

const SerializedValueContainer::SCHEMA_UNIFIED = 'DAAIDgoKAQw'

Definition at line 10 of file SerializedValueContainer.php.

Referenced by newUnified().

◆ SEGMENTED_HASHES

const SerializedValueContainer::SEGMENTED_HASHES = '__hashes__'

Definition at line 14 of file SerializedValueContainer.php.

Referenced by MediumSpecificBagOStuff\delete().

◆ UNIFIED_DATA

const SerializedValueContainer::UNIFIED_DATA = '__data__'

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