* @ingroup FileRepo
*/
class LocalRepo extends FileRepo {
- /** @var array */
+ /** @var callable */
protected $fileFactory = [ 'LocalFile', 'newFromTitle' ];
-
- /** @var array */
+ /** @var callable */
protected $fileFactoryKey = [ 'LocalFile', 'newFromKey' ];
-
- /** @var array */
+ /** @var callable */
protected $fileFromRowFactory = [ 'LocalFile', 'newFromRow' ];
-
- /** @var array */
+ /** @var callable */
protected $oldFileFromRowFactory = [ 'OldLocalFile', 'newFromRow' ];
-
- /** @var array */
+ /** @var callable */
protected $oldFileFactory = [ 'OldLocalFile', 'newFromTitle' ];
-
- /** @var array */
+ /** @var callable */
protected $oldFileFactoryKey = [ 'OldLocalFile', 'newFromKey' ];
function __construct( array $info = null ) {
parent::__construct( $info );
- $this->hasSha1Storage = isset( $info['storageLayout'] ) && $info['storageLayout'] === 'sha1';
+ $this->hasSha1Storage = isset( $info['storageLayout'] )
+ && $info['storageLayout'] === 'sha1';
if ( $this->hasSha1Storage() ) {
$this->backend = new FileBackendDBRepoWrapper( [
*
* @param array $storageKeys
*
- * @return FileRepoStatus
+ * @return Status
*/
function cleanupDeletedBatch( array $storageKeys ) {
if ( $this->hasSha1Storage() ) {
/**
* Get a connection to the replica DB
- * @return DatabaseBase
+ * @return IDatabase
*/
function getSlaveDB() {
return wfGetDB( DB_REPLICA );
/**
* Get a connection to the master DB
- * @return DatabaseBase
+ * @return IDatabase
*/
function getMasterDB() {
return wfGetDB( DB_MASTER );
*
* @param string $function
* @param array $args
- * @return FileRepoStatus
+ * @return Status
*/
protected function skipWriteOperationIfSha1( $function, array $args ) {
$this->assertWritableRepo(); // fail out if read-only