MediaWiki  1.23.2
CdbWriterPHP Class Reference

CDB writer class. More...

Inheritance diagram for CdbWriterPHP:
Collaboration diagram for CdbWriterPHP:

Public Member Functions

 __construct ( $fileName)
 
 close ()
 
 set ( $key, $value)
 
- Public Member Functions inherited from CdbWriter
 __destruct ()
 If the object goes out of scope, close it for sanity. More...
 

Public Attributes

 $hplist
 
 $numentries
 
 $pos
 

Protected Member Functions

 addbegin ( $keylen, $datalen)
 
 addend ( $keylen, $datalen, $h)
 
 finish ()
 
 posplus ( $len)
 
 throwException ( $msg)
 Clean up the temp file and throw an exception. More...
 
 write ( $buf)
 
- Protected Member Functions inherited from CdbWriter
 isWindows ()
 Are we running on Windows? More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CdbWriter
static open ( $fileName)
 Open a writer and return a subclass instance. More...
 
- Protected Attributes inherited from CdbWriter
 $handle
 The file handle. More...
 
string $realFileName
 File we'll be writing to when we're done. More...
 
string $tmpFileName
 File we write to temporarily until we're done. More...
 

Detailed Description

CDB writer class.

Definition at line 290 of file CdbPHP.php.

Constructor & Destructor Documentation

◆ __construct()

CdbWriterPHP::__construct (   $fileName)
Parameters
$fileNamestring

Reimplemented from CdbWriter.

Definition at line 297 of file CdbPHP.php.

References array(), and throwException().

Member Function Documentation

◆ addbegin()

CdbWriterPHP::addbegin (   $keylen,
  $datalen 
)
protected
Exceptions
CdbException
Parameters
$keylen
$datalen

Definition at line 391 of file CdbPHP.php.

References throwException(), and write().

Referenced by set().

◆ addend()

CdbWriterPHP::addend (   $keylen,
  $datalen,
  $h 
)
protected
Parameters
$keylen
$datalen
$h

Definition at line 374 of file CdbPHP.php.

References array(), and posplus().

Referenced by set().

◆ close()

CdbWriterPHP::close ( )
Exceptions
CdbException

Reimplemented from CdbWriter.

Definition at line 331 of file CdbPHP.php.

References finish(), CdbWriter\isWindows(), and throwException().

◆ finish()

CdbWriterPHP::finish ( )
protected

◆ posplus()

CdbWriterPHP::posplus (   $len)
protected
Exceptions
CdbException
Parameters
$len

Definition at line 360 of file CdbPHP.php.

References throwException().

Referenced by addend(), and finish().

◆ set()

CdbWriterPHP::set (   $key,
  $value 
)
Parameters
string$key
string$value

Reimplemented from CdbWriter.

Definition at line 317 of file CdbPHP.php.

References $value, addbegin(), addend(), CdbFunctions\hash(), and write().

◆ throwException()

CdbWriterPHP::throwException (   $msg)
protected

Clean up the temp file and throw an exception.

Parameters
$msgstring
Exceptions
CdbException

Definition at line 484 of file CdbPHP.php.

Referenced by __construct(), addbegin(), close(), finish(), posplus(), and write().

◆ write()

CdbWriterPHP::write (   $buf)
protected
Exceptions
CdbException
Parameters
$buf

Definition at line 349 of file CdbPHP.php.

References throwException().

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

Member Data Documentation

◆ $hplist

CdbWriterPHP::$hplist

Definition at line 291 of file CdbPHP.php.

◆ $numentries

CdbWriterPHP::$numentries

Definition at line 292 of file CdbPHP.php.

◆ $pos

CdbWriterPHP::$pos

Definition at line 292 of file CdbPHP.php.

Referenced by finish().


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