*/
class ForeignDBRepo extends LocalRepo {
# Settings
- var $dbType, $dbServer, $dbUser, $dbPassword, $dbName, $dbFlags,
- $tablePrefix, $hasSharedCache;
+ protected $dbType;
+ protected $dbServer;
+ protected $dbUser;
+ protected $dbPassword;
+ protected $dbName;
+ protected $dbFlags;
+ protected $tablePrefix;
+ protected $hasSharedCache;
# Other stuff
- var $dbConn;
- var $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
- var $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
+ protected $dbConn;
+ protected $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
+ protected $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
/**
* @param $info array|null
$this->dbConn = DatabaseBase::factory( $this->dbType,
array(
'host' => $this->dbServer,
- 'user' => $this->dbUser,
+ 'user' => $this->dbUser,
'password' => $this->dbPassword,
'dbname' => $this->dbName,
'flags' => $this->dbFlags,
- 'tablePrefix' => $this->tablePrefix
+ 'tablePrefix' => $this->tablePrefix,
+ 'foreign' => true,
)
);
}
+
return $this->dbConn;
}
if ( $this->hasSharedCache() ) {
$args = func_get_args();
array_unshift( $args, $this->dbName, $this->tablePrefix );
+
return call_user_func_array( 'wfForeignMemcKey', $args );
} else {
return false;