MediaWiki  REL1_24
CdbReader Class Reference

Read from a CDB file. More...

Inheritance diagram for CdbReader:

List of all members.

Public Member Functions

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

Static Public Member Functions

static haveExtension ()
 Returns true if the native extension is available.
static open ($fileName)
 Open a file and return a subclass instance.

Protected Attributes

 $handle
 The file handle.

Detailed Description

Read from a CDB file.

Native and pure PHP implementations are provided. http://cr.yp.to/cdb.html

Definition at line 28 of file Cdb.php.


Constructor & Destructor Documentation

CdbReader::__construct ( fileName) [abstract]

Create the object and open the file.

Parameters:
string$fileName

Reimplemented in CdbReaderPHP, and CdbReaderDBA.


Member Function Documentation

CdbReader::close ( ) [abstract]

Close the file.

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

Reimplemented in CdbReaderPHP, and CdbReaderDBA.

CdbReader::get ( key) [abstract]

Get a value with a given key.

Only string values are supported.

Parameters:
string$key

Reimplemented in CdbReaderPHP, and CdbReaderDBA.

static CdbReader::haveExtension ( ) [static]

Returns true if the native extension is available.

Returns:
bool

Definition at line 52 of file Cdb.php.

Referenced by open(), and CdbTest\setUp().

static CdbReader::open ( fileName) [static]

Open a file and return a subclass instance.

Parameters:
string$fileName
Returns:
CdbReader

Definition at line 41 of file Cdb.php.

References haveExtension().


Member Data Documentation

CdbReader::$handle [protected]

The file handle.

Definition at line 32 of file Cdb.php.


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