CdbFunctions Class Reference

This is a port of D.J. More...

List of all members.

Static Public Member Functions

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


Detailed Description

This is a port of D.J.

Bernstein's CDB to PHP. It's based on the copy that appears in PHP 5.3. Changes are: * Error returns replaced with exceptions * Exception thrown if sizes or offsets are between 2GB and 4GB * Some variables renamed Common functions for readers and writers

Definition at line 14 of file Cdb_PHP.php.


Member Function Documentation

static CdbFunctions::hash ( s  )  [static]

The CDB hash function.

Definition at line 45 of file Cdb_PHP.php.

References $i, and $s.

Referenced by CdbReader_PHP::findNext(), and CdbWriter_PHP::set().

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

Definition at line 19 of file Cdb_PHP.php.

Referenced by CdbReader_PHP::findNext(), and CdbWriter_PHP::finish().

static CdbFunctions::unsignedShiftRight ( a,
b 
) [static]

Shift a signed integer right as if it were unsigned.

Definition at line 31 of file Cdb_PHP.php.

Referenced by CdbReader_PHP::findNext(), and CdbWriter_PHP::finish().


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

Generated on Sat Apr 30 22:57:33 2011 for MediaWiki by  doxygen 1.5.9