function __construct( $fileName ) {
$this->handle = dba_open( $fileName, 'r-', 'cdb' );
if ( !$this->handle ) {
- throw new MWException( 'Unable to open DB file "' . $fileName . '"' );
+ throw new MWException( 'Unable to open CDB file "' . $fileName . '"' );
}
}
$this->tmpFileName = $fileName . '.tmp.' . mt_rand( 0, 0x7fffffff );
$this->handle = dba_open( $this->tmpFileName, 'n', 'cdb_make' );
if ( !$this->handle ) {
- throw new MWException( 'Unable to open DB file for write "' . $fileName . '"' );
+ throw new MWException( 'Unable to open CDB file for write "' . $fileName . '"' );
}
}
function __construct( $fileName ) {
$this->handle = fopen( $fileName, 'rb' );
if ( !$this->handle ) {
- throw new MWException( 'Unable to open DB file "' . $fileName . '"' );
+ throw new MWException( 'Unable to open CDB file "' . $fileName . '"' );
}
$this->findStart();
}
$buf = fread( $this->handle, $length );
if ( $buf === false || strlen( $buf ) !== $length ) {
- throw new MWException( __METHOD__.': read from cdb file failed, file may be corrupted' );
+ throw new MWException( __METHOD__.': read from CDB file failed, file may be corrupted' );
}
return $buf;
}
$this->tmpFileName = $fileName . '.tmp.' . mt_rand( 0, 0x7fffffff );
$this->handle = fopen( $this->tmpFileName, 'wb' );
if ( !$this->handle ) {
- throw new MWException( 'Unable to open DB file for write "' . $fileName . '"' );
+ throw new MWException( 'Unable to open CDB file for write "' . $fileName . '"' );
}
$this->hplist = array();
$this->numentries = 0;