CdbWriter_PHP Class Reference

CDB writer class. More...

Inherits CdbWriter.

List of all members.

Public Member Functions

 __construct ($fileName)
 Create the object and open the file.
 __destruct ()
 set ($key, $value)
 Set a key to a given value.
 close ()
 Close the writer object.

Public Attributes

 $handle
 $realFileName
 $tmpFileName
 $hplist
 $numEntries
 $pos

Protected Member Functions

 write ($buf)
 posplus ($len)
 addend ($keylen, $datalen, $h)
 addbegin ($keylen, $datalen)
 finish ()


Detailed Description

CDB writer class.

Definition at line 215 of file Cdb_PHP.php.


Constructor & Destructor Documentation

CdbWriter_PHP::__construct ( fileName  ) 

Create the object and open the file.

Reimplemented from CdbWriter.

Definition at line 221 of file Cdb_PHP.php.

CdbWriter_PHP::__destruct (  ) 

Definition at line 236 of file Cdb_PHP.php.

References close().


Member Function Documentation

CdbWriter_PHP::addbegin ( keylen,
datalen 
) [protected]

Definition at line 293 of file Cdb_PHP.php.

References write().

Referenced by set().

CdbWriter_PHP::addend ( keylen,
datalen,
h 
) [protected]

Definition at line 281 of file Cdb_PHP.php.

References posplus().

Referenced by set().

CdbWriter_PHP::close (  ) 

Close the writer object.

You should call this function before the object goes out of scope, to write out the final hashtables.

Reimplemented from CdbWriter.

Definition at line 253 of file Cdb_PHP.php.

References finish(), and wfIsWindows().

Referenced by __destruct().

CdbWriter_PHP::finish (  )  [protected]

Definition at line 304 of file Cdb_PHP.php.

References $i, $pos, posplus(), CdbFunctions::unsignedMod(), CdbFunctions::unsignedShiftRight(), and write().

Referenced by close().

CdbWriter_PHP::posplus ( len  )  [protected]

Definition at line 273 of file Cdb_PHP.php.

Referenced by addend(), and finish().

CdbWriter_PHP::set ( key,
value 
)

Set a key to a given value.

The value will be converted to string.

Reimplemented from CdbWriter.

Definition at line 242 of file Cdb_PHP.php.

References addbegin(), addend(), CdbFunctions::hash(), and write().

CdbWriter_PHP::write ( buf  )  [protected]

Definition at line 266 of file Cdb_PHP.php.

Referenced by addbegin(), finish(), and set().


Member Data Documentation

CdbWriter_PHP::$handle

Definition at line 216 of file Cdb_PHP.php.

CdbWriter_PHP::$hplist

Definition at line 218 of file Cdb_PHP.php.

CdbWriter_PHP::$numEntries

Definition at line 219 of file Cdb_PHP.php.

CdbWriter_PHP::$pos

Definition at line 219 of file Cdb_PHP.php.

Referenced by finish().

CdbWriter_PHP::$realFileName

Definition at line 216 of file Cdb_PHP.php.

CdbWriter_PHP::$tmpFileName

Definition at line 216 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