MediaWiki master
NullRepo.php
Go to the documentation of this file.
1<?php
8namespace MediaWiki\FileRepo;
9
10use LogicException;
11
18class NullRepo extends FileRepo {
22 public function __construct( $info ) {
23 }
24
25 protected function assertWritableRepo(): never {
26 throw new LogicException( static::class . ': write operations are not supported.' );
27 }
28}
29
31class_alias( NullRepo::class, 'NullRepo' );
Base class for file repositories.
Definition FileRepo.php:51
File repository with no files, for testing purposes.
Definition NullRepo.php:18
assertWritableRepo()
Throw an exception if this repo is read-only by design.
Definition NullRepo.php:25