]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/filerepo/NullRepo.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / includes / filerepo / NullRepo.php
index d5a1ee03dbef8bdc87c7b5de88fca63bcbfe8925..1c12e0274acdaaf35fbee4be5b898e5e170654cb 100644 (file)
@@ -2,6 +2,21 @@
 /**
  * File repository with no files.
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup FileRepo
  */
  * @ingroup FileRepo
  */
 class NullRepo extends FileRepo {
-       function __construct( $info ) {}
-
-       function storeBatch( $triplets, $flags = 0 ) {
-               return false;
+       /**
+        * @param array|null $info
+        */
+       function __construct( $info ) {
        }
 
-       function storeTemp( $originalName, $srcPath ) {
-               return false;
-       }
-       function append( $srcPath, $toAppendPath, $flags = 0 ){
-               return false;
-       }
-       function publishBatch( $triplets, $flags = 0 ) {
-               return false;
-       }
-       function deleteBatch( $sourceDestPairs ) {
-               return false;
-       }
-       function fileExistsBatch( $files, $flags = 0 ) {
-               return false;
-       }
-       function getFileProps( $virtualUrl ) {
-               return false;
-       }
-       function newFile( $title, $time = false ) {
-               return false;
-       }
-       function findFile( $title, $options = array() ) {
-               return false;
+       protected function assertWritableRepo() {
+               throw new MWException( static::class . ': write operations are not supported.' );
        }
 }