MediaWiki
REL1_22
|
CDB reader class. More...
Public Member Functions | |
__construct ($fileName) | |
close () | |
Close the file. | |
get ($key) | |
Public Attributes | |
$dlen | |
$dpos | |
$fileName | |
The filename. | |
$handle | |
The file handle. | |
$hpos | |
$hslots | |
$khash | |
$kpos | |
$loop | |
Protected Member Functions | |
find ($key) | |
findNext ($key) | |
findStart () | |
match ($key, $pos) | |
read ($length, $pos) | |
unpack31 ($s) | |
Unpack an unsigned integer and throw an exception if it needs more than 31 bits. | |
unpackSigned ($s) | |
Unpack a 32-bit signed integer. |
CDB reader class.
Definition at line 99 of file Cdb_PHP.php.
CdbReader_PHP::__construct | ( | $ | fileName | ) |
$fileName | string |
MWException |
Reimplemented from CdbReader.
Definition at line 131 of file Cdb_PHP.php.
References $fileName, and findStart().
Close the file.
Optional, you can just let the variable go out of scope.
Reimplemented from CdbReader.
Definition at line 140 of file Cdb_PHP.php.
CdbReader_PHP::find | ( | $ | key | ) | [protected] |
$key |
Definition at line 274 of file Cdb_PHP.php.
References $key, findNext(), and findStart().
Referenced by get().
CdbReader_PHP::findNext | ( | $ | key | ) | [protected] |
$key |
Definition at line 228 of file Cdb_PHP.php.
References $key, CdbFunctions\hash(), match(), read(), unpack31(), unpackSigned(), CdbFunctions\unsignedMod(), and CdbFunctions\unsignedShiftRight().
Referenced by find().
CdbReader_PHP::findStart | ( | ) | [protected] |
Definition at line 170 of file Cdb_PHP.php.
Referenced by __construct(), and find().
CdbReader_PHP::get | ( | $ | key | ) |
CdbReader_PHP::match | ( | $ | key, |
$ | pos | ||
) | [protected] |
$key | |
$pos |
Definition at line 165 of file Cdb_PHP.php.
Referenced by findNext().
CdbReader_PHP::read | ( | $ | length, |
$ | pos | ||
) | [protected] |
MWException |
$length | |
$pos |
Definition at line 180 of file Cdb_PHP.php.
Referenced by findNext(), get(), and match().
CdbReader_PHP::unpack31 | ( | $ | s | ) | [protected] |
Unpack an unsigned integer and throw an exception if it needs more than 31 bits.
$s |
MWException |
Definition at line 205 of file Cdb_PHP.php.
References $s.
Referenced by findNext().
CdbReader_PHP::unpackSigned | ( | $ | s | ) | [protected] |
Unpack a 32-bit signed integer.
$s |
Definition at line 219 of file Cdb_PHP.php.
References $s.
Referenced by findNext().
CdbReader_PHP::$dlen |
Definition at line 125 of file Cdb_PHP.php.
CdbReader_PHP::$dpos |
Definition at line 122 of file Cdb_PHP.php.
CdbReader_PHP::$fileName |
CdbReader_PHP::$handle |
The file handle.
Definition at line 104 of file Cdb_PHP.php.
CdbReader_PHP::$hpos |
Definition at line 116 of file Cdb_PHP.php.
CdbReader_PHP::$hslots |
Definition at line 119 of file Cdb_PHP.php.
CdbReader_PHP::$khash |
Definition at line 110 of file Cdb_PHP.php.
CdbReader_PHP::$kpos |
Definition at line 113 of file Cdb_PHP.php.
CdbReader_PHP::$loop |
Definition at line 107 of file Cdb_PHP.php.