CdbReader_PHP Class Reference

CDB reader class. More...

Inherits CdbReader.

List of all members.

Public Member Functions

 __construct ($fileName)
 Construct the object and open the file.
 close ()
 Close the file.
 get ($key)
 Get a value with a given key.

Public Attributes

 $handle
 The file handle.
 $loop
 $khash
 $kpos
 $hpos
 $hslots
 $dpos
 $dlen

Protected Member Functions

 match ($key, $pos)
 findStart ()
 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.
 findNext ($key)
 find ($key)


Detailed Description

CDB reader class.

Definition at line 71 of file Cdb_PHP.php.


Constructor & Destructor Documentation

CdbReader_PHP::__construct ( fileName  ) 

Construct the object and open the file.

Reimplemented from CdbReader.

Definition at line 96 of file Cdb_PHP.php.

References findStart().


Member Function Documentation

CdbReader_PHP::close (  ) 

Close the file.

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

Reimplemented from CdbReader.

Definition at line 104 of file Cdb_PHP.php.

CdbReader_PHP::find ( key  )  [protected]

Definition at line 206 of file Cdb_PHP.php.

References findNext(), and findStart().

Referenced by get().

CdbReader_PHP::findNext ( key  )  [protected]

CdbReader_PHP::findStart (  )  [protected]

Definition at line 124 of file Cdb_PHP.php.

Referenced by __construct(), and find().

CdbReader_PHP::get ( key  ) 

Get a value with a given key.

Only string values are supported.

Reimplemented from CdbReader.

Definition at line 110 of file Cdb_PHP.php.

References find(), and read().

CdbReader_PHP::match ( key,
pos 
) [protected]

Definition at line 119 of file Cdb_PHP.php.

References read().

Referenced by findNext().

CdbReader_PHP::read ( length,
pos 
) [protected]

Definition at line 128 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.

Definition at line 148 of file Cdb_PHP.php.

References $s.

Referenced by findNext().

CdbReader_PHP::unpackSigned ( s  )  [protected]

Unpack a 32-bit signed integer.

Definition at line 159 of file Cdb_PHP.php.

References $s.

Referenced by findNext().


Member Data Documentation

CdbReader_PHP::$dlen

Definition at line 94 of file Cdb_PHP.php.

CdbReader_PHP::$dpos

Definition at line 91 of file Cdb_PHP.php.

CdbReader_PHP::$handle

The file handle.

Definition at line 73 of file Cdb_PHP.php.

CdbReader_PHP::$hpos

Definition at line 85 of file Cdb_PHP.php.

CdbReader_PHP::$hslots

Definition at line 88 of file Cdb_PHP.php.

CdbReader_PHP::$khash

Definition at line 79 of file Cdb_PHP.php.

CdbReader_PHP::$kpos

Definition at line 82 of file Cdb_PHP.php.

CdbReader_PHP::$loop

Definition at line 76 of file Cdb_PHP.php.


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