'timestamp',
);
- var $fileFactory = array( 'ForeignAPIFile', 'newFromTitle' );
- /* Check back with Commons after a day */
- var $apiThumbCacheExpiry = 86400; /* 24*60*60 */
- /* Redownload thumbnail files after a month */
- var $fileCacheExpiry = 2592000; /* 86400*30 */
+ protected $fileFactory = array( 'ForeignAPIFile', 'newFromTitle' );
+ /** @var int Check back with Commons after a day (24*60*60) */
+ protected $apiThumbCacheExpiry = 86400;
- protected $mQueryCache = array();
+ /** @var int Redownload thumbnail files after a month (86400*30) */
+ protected $fileCacheExpiry = 2592000;
+
+ /** @var array */
+ private $mQueryCache = array();
+
+ /** @var array */
protected $mFileExists = array();
/**
*/
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
* @ingroup FileRepo
*/
class ForeignDBViaLBRepo extends LocalRepo {
- var $wiki, $dbName, $tablePrefix;
- var $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
- var $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
+ protected $wiki;
+ protected $dbName;
+ protected $tablePrefix;
+ protected $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
+ protected $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' );
/**
* @param $info array|null
* @ingroup FileRepo
*/
class LocalRepo extends FileRepo {
- var $fileFactory = array( 'LocalFile', 'newFromTitle' );
- var $fileFactoryKey = array( 'LocalFile', 'newFromKey' );
- var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
- var $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' );
- var $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' );
- var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
+ protected $fileFactory = array( 'LocalFile', 'newFromTitle' );
+ protected $fileFactoryKey = array( 'LocalFile', 'newFromKey' );
+ protected $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
+ protected $oldFileFactory = array( 'OldLocalFile', 'newFromTitle' );
+ protected $oldFileFactoryKey = array( 'OldLocalFile', 'newFromKey' );
+ protected $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
/**
* @throws MWException
* @ingroup FileRepo
*/
class RepoGroup {
- /**
- * @var LocalRepo
- */
- var $localRepo;
+ /** @var LocalRepo */
+ protected $localRepo;
- var $foreignRepos, $reposInitialised = false;
- var $localInfo, $foreignInfo;
- var $cache;
+ protected $foreignRepos;
- /**
- * @var RepoGroup
- */
+ /** @var bool */
+ protected $reposInitialised = false;
+
+ protected $localInfo;
+ protected $foreignInfo;
+
+ /** @var array */
+ protected $cache;
+
+ /** @var RepoGroup */
protected static $instance;
+
+ /** Maximum number of cache items */
const MAX_CACHE_SIZE = 500;
/**