summaryrefslogtreecommitdiff
path: root/includes/filerepo/ForeignDBRepo.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/filerepo/ForeignDBRepo.php')
-rw-r--r--includes/filerepo/ForeignDBRepo.php46
1 files changed, 39 insertions, 7 deletions
diff --git a/includes/filerepo/ForeignDBRepo.php b/includes/filerepo/ForeignDBRepo.php
index 37c65723..6e9e6add 100644
--- a/includes/filerepo/ForeignDBRepo.php
+++ b/includes/filerepo/ForeignDBRepo.php
@@ -27,17 +27,37 @@
* @ingroup FileRepo
*/
class ForeignDBRepo extends LocalRepo {
- # Settings
- var $dbType, $dbServer, $dbUser, $dbPassword, $dbName, $dbFlags,
- $tablePrefix, $hasSharedCache;
+ /** @var string */
+ protected $dbType;
+
+ /** @var string */
+ protected $dbServer;
+
+ /** @var string */
+ protected $dbUser;
+
+ /** @var string */
+ protected $dbPassword;
+
+ /** @var string */
+ protected $dbName;
+
+ /** @var string */
+ protected $dbFlags;
+
+ /** @var string */
+ protected $tablePrefix;
+
+ /** @var bool */
+ 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
+ * @param array|null $info
*/
function __construct( $info ) {
parent::__construct( $info );
@@ -68,6 +88,7 @@ class ForeignDBRepo extends LocalRepo {
)
);
}
+
return $this->dbConn;
}
@@ -95,6 +116,7 @@ class ForeignDBRepo extends LocalRepo {
if ( $this->hasSharedCache() ) {
$args = func_get_args();
array_unshift( $args, $this->dbName, $this->tablePrefix );
+
return call_user_func_array( 'wfForeignMemcKey', $args );
} else {
return false;
@@ -104,4 +126,14 @@ class ForeignDBRepo extends LocalRepo {
protected function assertWritableRepo() {
throw new MWException( get_class( $this ) . ': write operations are not supported.' );
}
+
+ /**
+ * Return information about the repository.
+ *
+ * @return array
+ * @since 1.22
+ */
+ function getInfo() {
+ return FileRepo::getInfo();
+ }
}