MediaWiki  1.23.15
CdbFunctions Class Reference

Common functions for readers and writers. More...

Static Public Member Functions

static hash ( $s)
 The CDB hash function. More...
 
static unsignedMod ( $a, $b)
 Take a modulo of a signed integer as if it were an unsigned integer. More...
 
static unsignedShiftRight ( $a, $b)
 Shift a signed integer right as if it were unsigned. More...
 

Detailed Description

Common functions for readers and writers.

Definition at line 30 of file CdbPHP.php.

Member Function Documentation

◆ hash()

static CdbFunctions::hash (   $s)
static

The CDB hash function.

Parameters
$sstring
Returns
int

Definition at line 74 of file CdbPHP.php.

References $s.

Referenced by CdbReaderPHP\findNext(), and CdbWriterPHP\set().

◆ unsignedMod()

static CdbFunctions::unsignedMod (   $a,
  $b 
)
static

Take a modulo of a signed integer as if it were an unsigned integer.

$b must be less than 0x40000000 and greater than 0

Parameters
$a
$b
Returns
int

Definition at line 40 of file CdbPHP.php.

Referenced by CdbReaderPHP\findNext(), and CdbWriterPHP\finish().

◆ unsignedShiftRight()

static CdbFunctions::unsignedShiftRight (   $a,
  $b 
)
static

Shift a signed integer right as if it were unsigned.

Parameters
$a
$b
Returns
int

Definition at line 56 of file CdbPHP.php.

Referenced by CdbReaderPHP\findNext(), and CdbWriterPHP\finish().


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