MediaWiki  REL1_19
CdbReader_PHP Class Reference

CDB reader class. More...

Inheritance diagram for CdbReader_PHP:
Collaboration diagram for CdbReader_PHP:

List of all members.

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.

Detailed Description

CDB reader class.

Definition at line 84 of file Cdb_PHP.php.


Constructor & Destructor Documentation

CdbReader_PHP::__construct ( fileName)
Parameters:
$fileNamestring

Reimplemented from CdbReader.

Definition at line 115 of file Cdb_PHP.php.

References $fileName, and findStart().

Here is the call graph for this function:


Member Function Documentation

Close the file.

Optional, you can just let the variable go out of scope.

Reimplemented from CdbReader.

Definition at line 124 of file Cdb_PHP.php.

CdbReader_PHP::find ( key) [protected]
Parameters:
$key
Returns:
bool

Definition at line 257 of file Cdb_PHP.php.

References findNext(), and findStart().

Referenced by get().

Here is the call graph for this function:

Here is the caller graph for this function:

CdbReader_PHP::findNext ( key) [protected]
Parameters:
$key
Returns:
bool

Definition at line 211 of file Cdb_PHP.php.

References CdbFunctions\hash(), match(), read(), unpack31(), unpackSigned(), CdbFunctions\unsignedMod(), and CdbFunctions\unsignedShiftRight().

Referenced by find().

Here is the call graph for this function:

Here is the caller graph for this function:

CdbReader_PHP::findStart ( ) [protected]

Definition at line 154 of file Cdb_PHP.php.

Referenced by __construct(), and find().

Here is the caller graph for this function:

CdbReader_PHP::get ( key)
Parameters:
$key
Returns:
bool|string

Reimplemented from CdbReader.

Definition at line 135 of file Cdb_PHP.php.

References find(), and read().

Here is the call graph for this function:

CdbReader_PHP::match ( key,
pos 
) [protected]
Parameters:
$key
$pos
Returns:
bool

Definition at line 149 of file Cdb_PHP.php.

References read().

Referenced by findNext().

Here is the call graph for this function:

Here is the caller graph for this function:

CdbReader_PHP::read ( length,
pos 
) [protected]
Exceptions:
MWException
Parameters:
$length
$pos
Returns:
string

Definition at line 164 of file Cdb_PHP.php.

Referenced by findNext(), get(), and match().

Here is the caller graph for this function:

CdbReader_PHP::unpack31 ( s) [protected]

Unpack an unsigned integer and throw an exception if it needs more than 31 bits.

Parameters:
$s
Returns:

Definition at line 188 of file Cdb_PHP.php.

Referenced by findNext().

Here is the caller graph for this function:

CdbReader_PHP::unpackSigned ( s) [protected]

Unpack a 32-bit signed integer.

Parameters:
$s
Returns:
int

Definition at line 202 of file Cdb_PHP.php.

Referenced by findNext().

Here is the caller graph for this function:


Member Data Documentation

CdbReader_PHP::$dlen

Definition at line 110 of file Cdb_PHP.php.

CdbReader_PHP::$dpos

Definition at line 107 of file Cdb_PHP.php.

CdbReader_PHP::$fileName

The filename.

Definition at line 86 of file Cdb_PHP.php.

Referenced by __construct().

CdbReader_PHP::$handle

The file handle.

Definition at line 89 of file Cdb_PHP.php.

CdbReader_PHP::$hpos

Definition at line 101 of file Cdb_PHP.php.

CdbReader_PHP::$hslots

Definition at line 104 of file Cdb_PHP.php.

CdbReader_PHP::$khash

Definition at line 95 of file Cdb_PHP.php.

CdbReader_PHP::$kpos

Definition at line 98 of file Cdb_PHP.php.

CdbReader_PHP::$loop

Definition at line 92 of file Cdb_PHP.php.


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