MediaWiki  REL1_22
CdbReader Class Reference

Read from a CDB file. More...

Inheritance diagram for 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.

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.

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]

Construct the object and open the file.

Reimplemented in CdbReader_PHP.


Member Function Documentation

CdbReader::close ( ) [abstract]

Close the file.

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

Reimplemented in CdbReader_PHP.

CdbReader::get ( key) [abstract]

Get a value with a given key.

Only string values are supported.

Parameters:
$keystring

Reimplemented in CdbReader_PHP.

static CdbReader::haveExtension ( ) [static]

Returns true if the native extension is available.

Returns:
bool

Definition at line 50 of file Cdb.php.

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

static CdbReader::open ( fileName) [static]

Open a file and return a subclass instance.

Parameters:
$fileNamestring
Returns:
CdbReader

Definition at line 36 of file Cdb.php.

References wfDebug().

Referenced by Interwiki\getAllPrefixesCached(), and Interwiki\getInterwikiCacheEntry().


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