Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MessageChangeStorage Class Reference

Static Public Member Functions

static writeChanges (array $changes, $file)
 Writes change array as a serialized file.
 
static isValidCdbName ( $name)
 Validate a name.
 
static getCdbPath ( $name)
 Get a full path to file in a known location.
 
static getGroupChanges ( $cdbPath, $groupId)
 Fetches changes for a group from the message change file.
 
static writeGroupChanges (MessageSourceChange $changes, $groupId, $cdbPath)
 Writes changes for a group.
 
static getLastModifiedTime ( $cdbPath)
 Gets the last modified time for the CDB file.
 
static isModifiedSince ( $cdbPath, $time)
 Checks if the CDB file has been modified since the time given.
 

Public Attributes

const DEFAULT_NAME = 'default'
 

Detailed Description

Definition at line 14 of file MessageChangeStorage.php.

Member Function Documentation

◆ getCdbPath()

static MessageChangeStorage::getCdbPath ( $name)
static

Get a full path to file in a known location.

Parameters
string$nameWhich file to use.
Returns
string

Definition at line 53 of file MessageChangeStorage.php.

◆ getGroupChanges()

static MessageChangeStorage::getGroupChanges ( $cdbPath,
$groupId )
static

Fetches changes for a group from the message change file.

Parameters
string$cdbPathPath of the cdb file.
string$groupId
Returns
MessageSourceChange

Definition at line 63 of file MessageChangeStorage.php.

◆ getLastModifiedTime()

static MessageChangeStorage::getLastModifiedTime ( $cdbPath)
static

Gets the last modified time for the CDB file.

Parameters
string$cdbPath
Returns
int time of last modification (Unix timestamp)

Definition at line 127 of file MessageChangeStorage.php.

◆ isModifiedSince()

static MessageChangeStorage::isModifiedSince ( $cdbPath,
$time )
static

Checks if the CDB file has been modified since the time given.

Parameters
string$cdbPath
int$timeUnix timestamp
Returns
bool

Definition at line 144 of file MessageChangeStorage.php.

◆ isValidCdbName()

static MessageChangeStorage::isValidCdbName ( $name)
static

Validate a name.

Parameters
string$nameWhich file to use.
Returns
bool

Definition at line 43 of file MessageChangeStorage.php.

◆ writeChanges()

static MessageChangeStorage::writeChanges ( array $changes,
$file )
static

Writes change array as a serialized file.

Parameters
MessageSourceChange[]$changesArray of changes as returned by processGroup indexed by message group id.
string$fileWhich file to use.

Definition at line 24 of file MessageChangeStorage.php.

◆ writeGroupChanges()

static MessageChangeStorage::writeGroupChanges ( MessageSourceChange $changes,
$groupId,
$cdbPath )
static

Writes changes for a group.

Has to read the changes first from the file, and then re-write them to the file.

Parameters
MessageSourceChange$changes
string$groupId
string$cdbPathPath of the cdb file.

Definition at line 88 of file MessageChangeStorage.php.

Member Data Documentation

◆ DEFAULT_NAME

const MessageChangeStorage::DEFAULT_NAME = 'default'

Definition at line 15 of file MessageChangeStorage.php.


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