Inherits CdbWriter.
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 () |
Definition at line 215 of file Cdb_PHP.php.
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 | ( | ) |
CdbWriter_PHP::addbegin | ( | $ | keylen, | |
$ | datalen | |||
) | [protected] |
CdbWriter_PHP::addend | ( | $ | keylen, | |
$ | datalen, | |||
$ | h | |||
) | [protected] |
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] |
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] |
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 |
CdbWriter_PHP::$realFileName |
Definition at line 216 of file Cdb_PHP.php.
CdbWriter_PHP::$tmpFileName |
Definition at line 216 of file Cdb_PHP.php.